summaryrefslogtreecommitdiff
path: root/t/t3070-wildmatch.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t3070-wildmatch.sh')
-rwxr-xr-xt/t3070-wildmatch.sh14
1 files changed, 13 insertions, 1 deletions
diff --git a/t/t3070-wildmatch.sh b/t/t3070-wildmatch.sh
index 891d4d7..4dd42df 100755
--- a/t/t3070-wildmatch.sh
+++ b/t/t3070-wildmatch.sh
@@ -2,6 +2,7 @@
test_description='wildmatch tests'
+TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh
should_create_test_file() {
@@ -187,7 +188,7 @@ match() {
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
- dirs=${file%/*}
+ dirs=${file%/*} &&
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
@@ -430,4 +431,15 @@ match 1 1 1 1 'a' '[B-a]'
match 0 1 0 1 'z' '[Z-y]'
match 1 1 1 1 'Z' '[Z-y]'
+test_expect_success 'matching does not exhibit exponential behavior' '
+ {
+ test-tool wildmatch wildmatch \
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab \
+ "*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a" &
+ pid=$!
+ } &&
+ sleep 2 &&
+ ! kill $!
+'
+
test_done