mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +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…
Add table
Add a link
Reference in a new issue