From dde512ac8001f5dc45de52fd82ccf6a8e5d4a138 Mon Sep 17 00:00:00 2001 From: Andrew Ilijic Date: Mon, 28 Oct 2019 11:21:16 -0400 Subject: ls: Add tests for `-C` and `-x` options These tests ensure we follow the behavior of other `ls` commands, in the basic case. --- tests/ls.test | 2 ++ 1 file changed, 2 insertions(+) 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" "" "" -- cgit v1.2.3