forked from lix-project/lix
Test the -b and -s flags of nix-store -q
This commit is contained in:
parent
a9c4a98770
commit
a0806389e9
|
@ -1,5 +1,6 @@
|
||||||
source common.sh
|
source common.sh
|
||||||
|
|
||||||
|
clearStore
|
||||||
clearProfiles
|
clearProfiles
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
|
@ -32,6 +33,17 @@ test "$(nix-env -q '*' | wc -l)" -eq 1
|
||||||
nix-env -q '*' | grep -q foo-1.0
|
nix-env -q '*' | grep -q foo-1.0
|
||||||
test "$($profiles/test/bin/foo)" = "foo-1.0"
|
test "$($profiles/test/bin/foo)" = "foo-1.0"
|
||||||
|
|
||||||
|
# Test nix-env -qc to compare installed against available packages, and vice versa.
|
||||||
|
nix-env -qc '*' | grep -q '< 2.0'
|
||||||
|
nix-env -qac '*' | grep -q '> 1.0'
|
||||||
|
|
||||||
|
# Test the -b flag to filter out source-only packages.
|
||||||
|
[ "$(nix-env -qab | wc -l)" -eq 1 ]
|
||||||
|
|
||||||
|
# Test the -s flag to get package status.
|
||||||
|
nix-env -qas | grep -q 'IP- foo-1.0'
|
||||||
|
nix-env -qas | grep -q -- '--- bar-0.1'
|
||||||
|
|
||||||
# Disable foo.
|
# Disable foo.
|
||||||
nix-env --set-flag active false foo
|
nix-env --set-flag active false foo
|
||||||
! [ -e "$profiles/test/bin/foo" ]
|
! [ -e "$profiles/test/bin/foo" ]
|
||||||
|
|
Loading…
Reference in a new issue