From 9c76c4faa6474122d7d2e7dffdcacc1d84a4dbd8 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 7 Mar 2019 22:13:26 -0800 Subject: tests: Add a test for extension overrides --- tests.sh | 10 ++++++++++ tests/test_color_ext_override.out | 17 +++++++++++++++++ tests/test_color_ext_underride.out | 17 +++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 tests/test_color_ext_override.out create mode 100644 tests/test_color_ext_underride.out diff --git a/tests.sh b/tests.sh index f7aaa8c..61e1273 100755 --- a/tests.sh +++ b/tests.sh @@ -631,6 +631,8 @@ bfs_tests=( test_color_or_mi0 test_color_ext test_color_ext0 + test_color_ext_override + test_color_ext_underride test_color_missing_colon test_execdir_plus @@ -1866,6 +1868,14 @@ function test_color_ext0() { LS_COLORS="*.txt=00:" bfs_diff rainbow -color } +function test_color_ext_override() { + LS_COLORS="*.txt=01;31:*t=01;33:" bfs_diff rainbow -color +} + +function test_color_ext_underride() { + LS_COLORS="*t=01;33:*.txt=01;31:" bfs_diff rainbow -color +} + function test_color_missing_colon() { LS_COLORS="*.txt=01" bfs_diff rainbow -color } diff --git a/tests/test_color_ext_override.out b/tests/test_color_ext_override.out new file mode 100644 index 0000000..ba895ec --- /dev/null +++ b/tests/test_color_ext_override.out @@ -0,0 +1,17 @@ +rainbow +rainbow/exec.sh +rainbow/file.dat +rainbow/file.txt +rainbow/socket +rainbow/chardev_link +rainbow/link.txt +rainbow/sticky_ow +rainbow/sgid +rainbow/ow +rainbow/sugid +rainbow/suid +rainbow/sticky +rainbow/broken +rainbow/pipe +rainbow/mh1 +rainbow/mh2 diff --git a/tests/test_color_ext_underride.out b/tests/test_color_ext_underride.out new file mode 100644 index 0000000..c9e21f2 --- /dev/null +++ b/tests/test_color_ext_underride.out @@ -0,0 +1,17 @@ +rainbow +rainbow/file.txt +rainbow/exec.sh +rainbow/file.dat +rainbow/socket +rainbow/chardev_link +rainbow/link.txt +rainbow/sticky_ow +rainbow/sgid +rainbow/ow +rainbow/sugid +rainbow/suid +rainbow/sticky +rainbow/broken +rainbow/pipe +rainbow/mh1 +rainbow/mh2 -- cgit v1.2.3