fix search test

This commit is contained in:
Max Headroom 2024-03-25 18:46:03 +01:00
parent ee50c7d033
commit 06eac000db

View file

@ -17,15 +17,11 @@ clearCache
# Multiple arguments will not exist # Multiple arguments will not exist
(( $(nix search -f search.nix hello broken | wc -l) == 0 )) (( $(nix search -f search.nix hello broken | wc -l) == 0 ))
# No regex should return an error
(( $(nix search -f search.nix '' | wc -l) == 0 ))
## Search expressions ## Search expressions
# Check that empty search string matches all nix search -f search.nix ^ | grepQuiet foo
nix search -f search.nix '' ^ | grepQuiet foo nix search -f search.nix ^ | grepQuiet bar
nix search -f search.nix '' ^ | grepQuiet bar nix search -f search.nix ^ | grepQuiet hello
nix search -f search.nix '' ^ | grepQuiet hello
## Tests for multiple regex/match highlighting ## Tests for multiple regex/match highlighting