From 86da865d82a977c4db084327274912d228f2e9f5 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 27 Jun 2019 19:16:20 -0400 Subject: color: Fix a crash if LS_COLORS ends in * --- tests.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests.sh') diff --git a/tests.sh b/tests.sh index fd31036..32019a3 100755 --- a/tests.sh +++ b/tests.sh @@ -617,6 +617,7 @@ bfs_tests=( test_color_missing_colon test_color_no_stat test_color_L_no_stat + test_color_star test_execdir_plus @@ -2099,6 +2100,11 @@ function test_color_L_no_stat() { LS_COLORS="mh=0:ex=0:sg=0:su=0:st=0:ow=0:tw=0:*.txt=01:" bfs_diff -L rainbow -color } +function test_color_star() { + # Regression test: don't segfault on LS_COLORS="*" + LS_COLORS="*" bfs_diff rainbow -color +} + function test_deep() { closefrom 4 -- cgit v1.2.3