Skip to content

Commit

Permalink
test --lohi
Browse files Browse the repository at this point in the history
  • Loading branch information
D3V1LC0D3R authored and D3V1LC0D3R committed Apr 26, 2024
1 parent 0806fad commit a18aca2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/by-util/test_free.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@ fn test_free_count() {
assert_eq!(result.stdout_str().lines().count(), 7);
}

#[test]
fn test_free_lohi() {
let result = new_ucmd!().arg("--lohi").succeeds();
assert_eq!(result.stdout_str().lines().count(), 5);
let lines = result.stdout_str().lines().collect::<Vec<&str>>();
assert!(lines[2].starts_with("Low:"));
assert!(lines[3].starts_with("High:"));
}

#[test]
fn test_free_column_format() {
let re_head_str = r"^ {15}total {8}used {8}free {6}shared {2}buff/cache {3}available$";
Expand Down

0 comments on commit a18aca2

Please sign in to comment.