mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 00:08:07 +02:00
b69323f8c9
It uses the evaluation cache now rather than the ad hoc JSON cache.
25 lines
683 B
Bash
25 lines
683 B
Bash
source common.sh
|
|
|
|
clearStore
|
|
clearCache
|
|
|
|
(( $(nix search -f search.nix '' hello | wc -l) > 0 ))
|
|
|
|
# Check descriptions are searched
|
|
(( $(nix search -f search.nix '' broken | wc -l) > 0 ))
|
|
|
|
# Check search that matches nothing
|
|
(( $(nix search -f search.nix '' nosuchpackageexists | wc -l) == 0 ))
|
|
|
|
# Search for multiple arguments
|
|
(( $(nix search -f search.nix '' hello empty | wc -l) == 2 ))
|
|
|
|
# Multiple arguments will not exist
|
|
(( $(nix search -f search.nix '' hello broken | wc -l) == 0 ))
|
|
|
|
## Search expressions
|
|
|
|
# Check that empty search string matches all
|
|
nix search -f search.nix '' |grep -q foo
|
|
nix search -f search.nix '' |grep -q bar
|
|
nix search -f search.nix '' |grep -q hello
|