mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-09-15 19:36:16 +00:00
Merge pull request #4279 from rivy/up.uname
change/uname ~ update and revise
This commit is contained in:
commit
afbe850115
4 changed files with 45 additions and 56 deletions
|
@ -104,10 +104,11 @@ fn test_uname_operating_system() {
|
|||
.succeeds()
|
||||
.stdout_is("Redox\n");
|
||||
#[cfg(target_os = "windows")]
|
||||
new_ucmd!()
|
||||
.arg("--operating-system")
|
||||
.succeeds()
|
||||
.stdout_is("Windows NT\n");
|
||||
{
|
||||
let result = new_ucmd!().arg("--operating-system").succeeds();
|
||||
println!("{:?}", result.stdout_str());
|
||||
assert!(result.stdout_str().starts_with("MS/Windows"));
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -117,3 +118,11 @@ fn test_uname_help() {
|
|||
.succeeds()
|
||||
.stdout_contains("system information");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_uname_output_for_invisible_chars() {
|
||||
// let re = regex::Regex::new("[^[[:print:]]]").unwrap(); // matches invisible (and emojis)
|
||||
let re = regex::Regex::new("[^[[:print:]]\\p{Other_Symbol}]").unwrap(); // matches invisible (not emojis)
|
||||
let result = new_ucmd!().arg("--all").succeeds();
|
||||
assert_eq!(re.find(result.stdout_str().trim_end()), None);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue