mirror of
https://github.com/uutils/coreutils
synced 2024-11-16 09:48:03 +00:00
test(hostid) add a test for hostid (#1533)
This commit is contained in:
parent
a7de28a714
commit
f87b041e27
1 changed files with 13 additions and 1 deletions
|
@ -1 +1,13 @@
|
|||
// ToDO: add tests
|
||||
use crate::common::util::*;
|
||||
extern crate regex;
|
||||
use self::regex::Regex;
|
||||
|
||||
#[test]
|
||||
fn test_normal() {
|
||||
let (_, mut ucmd) = at_and_ucmd!();
|
||||
let result = ucmd.run();
|
||||
|
||||
assert!(result.success);
|
||||
let re = Regex::new(r"^[0-9a-f]{8}").unwrap();
|
||||
assert!(re.is_match(&result.stdout.trim()));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue