aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Ilijic <ilijic.andrew@gmail.com>2019-10-28 11:21:16 -0400
committerRob Landley <rob@landley.net>2019-10-31 22:24:56 -0500
commitdde512ac8001f5dc45de52fd82ccf6a8e5d4a138 (patch)
tree4f376ca883c5a1858a0a94973a5eb12c230cdf26
parent342c088a70c6d7ccb02521b430b2fb0125611ed8 (diff)
downloadtoybox-dde512ac8001f5dc45de52fd82ccf6a8e5d4a138.tar.gz
ls: Add tests for `-C` and `-x` options
These tests ensure we follow the behavior of other `ls` commands, in the basic case.
-rwxr-xr-xtests/ls.test2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/ls.test b/tests/ls.test
index ce88b04b..33877aa2 100755
--- a/tests/ls.test
+++ b/tests/ls.test
@@ -18,6 +18,8 @@ IN="cd lstest"
OUT="cd .. "
testing "no argument" "$IN && ls; $OUT" "dir1\ndir2\nfile1.txt\nfile2.txt\n" "" ""
+testing "with -C: test column spacing equals 2" "$IN && ls -C; $OUT" "dir1 dir2 file1.txt file2.txt\n" "" ""
+testing "with -x: test column spacing equals 2" "$IN && ls -x; $OUT" "dir1 dir2 file1.txt file2.txt\n" "" ""
testing "with wild char" "$IN && ls file*; $OUT" "file1.txt\nfile2.txt\n" "" ""
testing "with wild char - long listing" "$IN && ls -1 file*; $OUT" "file1.txt\nfile2.txt\n" "" ""
testing "with -p" "$IN && ls -p; $OUT" "dir1/\ndir2/\nfile1.txt\nfile2.txt\n" "" ""