]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: run ls capability coloring test irrespective of $LS_COLORS
authorPádraig Brady <P@draigBrady.com>
Tue, 28 Apr 2015 20:24:57 +0000 (21:24 +0100)
committerPádraig Brady <P@draigBrady.com>
Tue, 28 Apr 2015 20:30:25 +0000 (21:30 +0100)
* tests/ls/no-cap.sh: Ensure the test isn't skipped even if
capability coloring is disabled in the current $LS_COLORS.
Also just enable/disable capability coloring to avoid the
dircolors(1) overhead.

tests/ls/no-cap.sh

index 625f8397e53efc0960c44bdfef1a2c9cb4adb1e0..ecbfb31cad6f914c7b4e477656c952f6e65a5cb4 100755 (executable)
 print_ver_ ls
 require_strace_ capget
 
+LS_COLORS=ca=1; export LS_COLORS
 strace -e capget ls --color=always > /dev/null 2> out || fail=1
 $EGREP 'capget\(' out || skip_ "your ls doesn't call capget"
 
 rm -f out
-eval "$(TERM=xterm dircolors -b | sed 's/ca=[^:]*:/ca=:/')"
-strace -e capget ls --color=always > /dev/null 2> out || fail=1
 
+LS_COLORS=ca=:; export LS_COLORS
+strace -e capget ls --color=always > /dev/null 2> out || fail=1
 $EGREP 'capget\(' out && fail=1
 
 Exit $fail