From 21d92d3a1285d32e33d4d43894fd8139dfabca8e Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Mon, 18 Feb 2019 23:27:17 -0500 Subject: tests: Add a test for symlink coloring to a device --- tests.sh | 7 ++++++- tests/test_color.out | 1 + tests/test_color_L.out | 17 +++++++++++++++++ tests/test_color_ext.out | 1 + tests/test_color_ext0.out | 1 + tests/test_color_mh.out | 1 + tests/test_color_mh0.out | 1 + tests/test_color_mi.out | 1 + tests/test_color_missing_colon.out | 1 + tests/test_color_or.out | 1 + tests/test_color_or0_mi.out | 1 + tests/test_color_or_mi.out | 1 + tests/test_color_or_mi0.out | 1 + 13 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 tests/test_color_L.out diff --git a/tests.sh b/tests.sh index 926bf6f..189d324 100755 --- a/tests.sh +++ b/tests.sh @@ -185,7 +185,7 @@ function make_rainbow() { ln "$1/mh1" "$1/mh2" mkfifo "$1/pipe" # TODO: block - # TODO: chardev + ln -s /dev/null "$1/chardev_link" ln -s nowhere "$1/broken" "$TESTS/mksock" "$1/socket" touchp "$1"/s{u,g,ug}id @@ -621,6 +621,7 @@ bfs_tests=( # Primaries test_color + test_color_L test_color_mh test_color_mh0 test_color_or @@ -1819,6 +1820,10 @@ function test_color() { LS_COLORS= bfs_diff rainbow -color } +function test_color_L() { + LS_COLORS= bfs_diff -L rainbow -color +} + function test_color_mh() { LS_COLORS="mh=01:" bfs_diff rainbow -color } diff --git a/tests/test_color.out b/tests/test_color.out index 40e09b4..0acd9f0 100644 --- a/tests/test_color.out +++ b/tests/test_color.out @@ -1,6 +1,7 @@ rainbow rainbow/exec.sh rainbow/socket +rainbow/chardev_link rainbow/link.txt rainbow/sticky_ow rainbow/sgid diff --git a/tests/test_color_L.out b/tests/test_color_L.out new file mode 100644 index 0000000..9e17614 --- /dev/null +++ b/tests/test_color_L.out @@ -0,0 +1,17 @@ +rainbow +rainbow/exec.sh +rainbow/socket +rainbow/sticky_ow +rainbow/sgid +rainbow/ow +rainbow/sugid +rainbow/suid +rainbow/sticky +rainbow/broken +rainbow/chardev_link +rainbow/pipe +rainbow/file.dat +rainbow/file.txt +rainbow/link.txt +rainbow/mh1 +rainbow/mh2 diff --git a/tests/test_color_ext.out b/tests/test_color_ext.out index f8c4d28..c0bfe44 100644 --- a/tests/test_color_ext.out +++ b/tests/test_color_ext.out @@ -1,6 +1,7 @@ rainbow rainbow/exec.sh rainbow/socket +rainbow/chardev_link rainbow/link.txt rainbow/file.txt rainbow/sticky_ow diff --git a/tests/test_color_ext0.out b/tests/test_color_ext0.out index 8710fc8..aa4c582 100644 --- a/tests/test_color_ext0.out +++ b/tests/test_color_ext0.out @@ -2,6 +2,7 @@ rainbow/file.txt rainbow/exec.sh rainbow/socket +rainbow/chardev_link rainbow/link.txt rainbow/sticky_ow rainbow/sgid diff --git a/tests/test_color_mh.out b/tests/test_color_mh.out index 32e2b95..e10ee10 100644 --- a/tests/test_color_mh.out +++ b/tests/test_color_mh.out @@ -1,6 +1,7 @@ rainbow rainbow/exec.sh rainbow/socket +rainbow/chardev_link rainbow/link.txt rainbow/mh1 rainbow/mh2 diff --git a/tests/test_color_mh0.out b/tests/test_color_mh0.out index 40e09b4..0acd9f0 100644 --- a/tests/test_color_mh0.out +++ b/tests/test_color_mh0.out @@ -1,6 +1,7 @@ rainbow rainbow/exec.sh rainbow/socket +rainbow/chardev_link rainbow/link.txt rainbow/sticky_ow rainbow/sgid diff --git a/tests/test_color_mi.out b/tests/test_color_mi.out index 40e09b4..0acd9f0 100644 --- a/tests/test_color_mi.out +++ b/tests/test_color_mi.out @@ -1,6 +1,7 @@ rainbow rainbow/exec.sh rainbow/socket +rainbow/chardev_link rainbow/link.txt rainbow/sticky_ow rainbow/sgid diff --git a/tests/test_color_missing_colon.out b/tests/test_color_missing_colon.out index f8c4d28..c0bfe44 100644 --- a/tests/test_color_missing_colon.out +++ b/tests/test_color_missing_colon.out @@ -1,6 +1,7 @@ rainbow rainbow/exec.sh rainbow/socket +rainbow/chardev_link rainbow/link.txt rainbow/file.txt rainbow/sticky_ow diff --git a/tests/test_color_or.out b/tests/test_color_or.out index e132546..5103be1 100644 --- a/tests/test_color_or.out +++ b/tests/test_color_or.out @@ -1,6 +1,7 @@ rainbow rainbow/exec.sh rainbow/socket +rainbow/chardev_link rainbow/link.txt rainbow/broken rainbow/sticky_ow diff --git a/tests/test_color_or0_mi.out b/tests/test_color_or0_mi.out index 8b92ded..37b54c5 100644 --- a/tests/test_color_or0_mi.out +++ b/tests/test_color_or0_mi.out @@ -2,6 +2,7 @@ rainbow/exec.sh rainbow/socket rainbow/broken +rainbow/chardev_link rainbow/link.txt rainbow/sticky_ow rainbow/sgid diff --git a/tests/test_color_or_mi.out b/tests/test_color_or_mi.out index 8a095a8..6727548 100644 --- a/tests/test_color_or_mi.out +++ b/tests/test_color_or_mi.out @@ -2,6 +2,7 @@ rainbow/broken rainbow/exec.sh rainbow/socket +rainbow/chardev_link rainbow/link.txt rainbow/sticky_ow rainbow/sgid diff --git a/tests/test_color_or_mi0.out b/tests/test_color_or_mi0.out index 8a095a8..6727548 100644 --- a/tests/test_color_or_mi0.out +++ b/tests/test_color_or_mi0.out @@ -2,6 +2,7 @@ rainbow/broken rainbow/exec.sh rainbow/socket +rainbow/chardev_link rainbow/link.txt rainbow/sticky_ow rainbow/sgid -- cgit v1.2.3