mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
hostid: remove test_normal superseded by test_output_format
Per review feedback, drop the weaker unanchored test_normal now that test_output_format's fully-anchored regex covers the same ground.
This commit is contained in:
committed by
Daniel Hofstetter
parent
b372e0ff9e
commit
372d0a96c5
@@ -5,17 +5,9 @@
|
||||
use regex::Regex;
|
||||
use uutests::new_ucmd;
|
||||
|
||||
#[test]
|
||||
fn test_normal() {
|
||||
let re = Regex::new(r"^[0-9a-f]{8}").unwrap();
|
||||
new_ucmd!().succeeds().stdout_matches(&re);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_output_format() {
|
||||
// Output must be exactly 8 lowercase hex digits followed by a newline.
|
||||
// The stricter anchored regex catches outputs like "00000000garbage"
|
||||
// that the existing test_normal regex would incorrectly accept.
|
||||
let re = Regex::new(r"^[0-9a-f]{8}\n$").unwrap();
|
||||
new_ucmd!().succeeds().stdout_matches(&re);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user