committed by
Daniel Hofstetter
parent
07b28d8205
commit
4fc7653e84
@@ -14,3 +14,14 @@ fn test_invalid_arg() {
|
||||
fn test_hex() {
|
||||
new_ucmd!().arg("--hex").succeeds().stdout_contains("0x");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_json() {
|
||||
new_ucmd!()
|
||||
.arg("--json")
|
||||
.succeeds()
|
||||
// ensure some fields are there, non-exhausting
|
||||
.stdout_contains("\"lscpu\": [")
|
||||
.stdout_contains("\"field\": \"Architecture\"")
|
||||
.stdout_contains("\"field\": \"CPU(s)\"");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user