2016-03-25 21:25:52 +00:00
|
|
|
use common::util::*;
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_ls_ls() {
|
2016-08-23 11:52:43 +00:00
|
|
|
new_ucmd!().succeeds();
|
2016-05-22 07:46:54 +00:00
|
|
|
}
|
2016-12-25 05:32:12 +00:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_ls_ls_i() {
|
|
|
|
new_ucmd!().arg("-i").succeeds();
|
|
|
|
new_ucmd!().arg("-il").succeeds();
|
|
|
|
}
|
ls: implement --color flag
GNU coreutils ls command implements the --color option as follow:
--color[=WHEN]
colorize the output; WHEN can be 'always' (default if omitted),
'auto', or 'never'
With --color=auto, ls emits color codes only when standard output is connected
to a terminal.
Also, add support for the following aliases:
- ‘always’, ‘yes’, ‘force’
- ‘never’, ‘no’, ‘none’
- ‘auto’, ‘tty’, ‘if-tty’
Signed-off-by: Gabriel Ganne <gabriel.ganne@gmail.com>
2019-06-20 07:55:01 +00:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_ls_ls_color() {
|
|
|
|
new_ucmd!().arg("--color").succeeds();
|
|
|
|
new_ucmd!().arg("--color=always").succeeds();
|
|
|
|
new_ucmd!().arg("--color=never").succeeds();
|
|
|
|
}
|