From 57995abb03596e53c1fabd4d73bd0dedc450c39e Mon Sep 17 00:00:00 2001 From: Aaron Gyes Date: Thu, 4 Nov 2021 04:18:54 -0700 Subject: [PATCH] fix 'complete' test --- tests/checks/complete.fish | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/checks/complete.fish b/tests/checks/complete.fish index 28fb4807c..f3991cca2 100644 --- a/tests/checks/complete.fish +++ b/tests/checks/complete.fish @@ -295,13 +295,13 @@ if begin # set dir (realpath --relative-to="$PWD" (mktemp -d XXXXXXXX)) set dir (basename (mktemp -d XXXXXXXX)) mkdir -p $dir - if complete -C$dir | grep "^$dir/.*Directory" >/dev/null + if complete -C$dir | string match -r "^$dir/.*dir" >/dev/null echo "implicit cd complete works" else echo "no implicit cd complete" end #CHECK: implicit cd complete works - if complete -C"command $dir" | grep "^$dir/.*Directory" >/dev/null + if complete -C"command $dir" | string match -r "^$dir/.*dir" >/dev/null echo "implicit cd complete after 'command'" else echo "no implicit cd complete after 'command'" @@ -310,7 +310,7 @@ if begin popd if begin set -l PATH $PWD/test6.tmp.dir $PATH 2>/dev/null - complete -C$dir | grep "^$dir/.*Directory" >/dev/null + complete -C$dir | string match -r "^$dir/.*dir" >/dev/null end echo "incorrect implicit cd from PATH" else