2020-05-25 17:05:26 +00:00
|
|
|
use crate::common::util::*;
|
2020-04-28 07:34:55 +00:00
|
|
|
|
2020-04-29 17:03:22 +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-29 17:03:22 +00:00
|
|
|
}
|
|
|
|
|
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
|
|
|
}
|
2020-04-30 21:02:22 +00:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_df_compatible_type() {
|
2021-04-22 20:37:44 +00:00
|
|
|
new_ucmd!().arg("-aT").succeeds();
|
2020-04-30 21:02:22 +00:00
|
|
|
}
|
2020-04-29 17:03:22 +00:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_df_compatible_si() {
|
2021-04-22 20:37:44 +00:00
|
|
|
new_ucmd!().arg("-aH").succeeds();
|
2020-04-29 17:03:22 +00:00
|
|
|
}
|
|
|
|
|
2021-05-03 08:55:17 +00:00
|
|
|
#[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(
|
2021-05-08 11:13:52 +00:00
|
|
|
"Filesystem Size Used Available Use% Mounted on \n",
|
2021-05-03 08:55:17 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-04-29 17:03:22 +00:00
|
|
|
// ToDO: more tests...
|