coreutils/tests/by-util/test_df.rs

36 lines
812 B
Rust
Raw Normal View History

use crate::common::util::*;
2020-04-28 07:34:55 +00:00
#[test]
fn test_df_compatible_no_size_arg() {
2021-04-22 20:37:44 +00:00
new_ucmd!().arg("-a").succeeds();
}
2020-04-28 07:34:55 +00:00
#[test]
fn test_df_compatible() {
2021-04-22 20:37:44 +00:00
new_ucmd!().arg("-ah").succeeds();
2020-04-28 07:34:55 +00:00
}
#[test]
fn test_df_compatible_type() {
2021-04-22 20:37:44 +00:00
new_ucmd!().arg("-aT").succeeds();
}
#[test]
fn test_df_compatible_si() {
2021-04-22 20:37:44 +00:00
new_ucmd!().arg("-aH").succeeds();
}
#[test]
fn test_df_output() {
if cfg!(target_os = "macos") {
new_ucmd!().arg("-H").arg("-total").succeeds().
stdout_only("Filesystem Size Used Available Capacity Use% Mounted on \n");
} else {
new_ucmd!().arg("-H").arg("-total").succeeds().stdout_only(
"Filesystem Size Used Available Use% Mounted on \n"
);
}
}
// ToDO: more tests...