summaryrefslogtreecommitdiff
path: root/tests/misc
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2015-10-13 12:40:52 +0100
committerPádraig Brady <P@draigBrady.com>2015-10-16 12:23:30 +0100
commitc249a5afc4f480e10346198422a3161931afd574 (patch)
treefd799462c026bdba9c8c577ceba8799335054457 /tests/misc
parent3a68c3e99065fd17436260889fe821caa19a855e (diff)
downloadcoreutils-c249a5afc4f480e10346198422a3161931afd574.tar.xz
dircolors: support globbing of TERM entries
* src/dircolors.c (dc_parse_stream): Support globbing of TERM entries, to allow entries like "TERM *256color*" for example. * src/dircolors.hin: Reduce the internal list with globbing. * tests/misc/dircolors.pl: New test cases. * NEWS: Mention the improvement.
Diffstat (limited to 'tests/misc')
-rwxr-xr-xtests/misc/dircolors.pl8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/misc/dircolors.pl b/tests/misc/dircolors.pl
index b9f8a1d26..2e6f27d88 100755
--- a/tests/misc/dircolors.pl
+++ b/tests/misc/dircolors.pl
@@ -33,6 +33,14 @@ my @Tests =
. "export LS_COLORS\n"}],
['other-wr', '-b', {IN => "owt 40;33\n"},
{OUT => "LS_COLORS='tw=40;33:';\nexport LS_COLORS\n"}],
+ ['term-1', '-b', {IN => "TERM none\nowt 40;33\n"},
+ {OUT => "LS_COLORS='tw=40;33:';\nexport LS_COLORS\n"}],
+ ['term-2', '-b', {IN => "TERM non*\nowt 40;33\n"},
+ {OUT => "LS_COLORS='tw=40;33:';\nexport LS_COLORS\n"}],
+ ['term-3', '-b', {IN => "TERM nomatch\nowt 40;33\n"},
+ {OUT => "LS_COLORS='';\nexport LS_COLORS\n"}],
+ ['term-4', '-b', {IN => "TERM N*match\nowt 40;33\n"},
+ {OUT => "LS_COLORS='';\nexport LS_COLORS\n"}],
# CAREFUL: always specify the -b option, unless explicitly testing
# for csh syntax output.