Skip to content

Commit ff351c2

Browse files
committed
vmstat: add tests
1 parent 995013e commit ff351c2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/by-util/test_vmstat.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,13 @@ fn test_simple() {
1616
fn test_invalid_arg() {
1717
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
1818
}
19+
20+
#[test]
21+
fn test_unit() {
22+
new_ucmd!().args(&["-S", "M"]).succeeds();
23+
}
24+
25+
#[test]
26+
fn test_invalid_unit() {
27+
new_ucmd!().args(&["-S", "x"]).fails().code_is(1);
28+
}

0 commit comments

Comments
 (0)