Add some tests
This commit is contained in:
parent
2468672e30
commit
bc0fb109a9
|
@ -104,6 +104,11 @@ EOF
|
||||||
# Test 'nix flake info'.
|
# Test 'nix flake info'.
|
||||||
nix flake info --flake-registry $registry flake1 | grep -q 'ID: *flake1'
|
nix flake info --flake-registry $registry flake1 | grep -q 'ID: *flake1'
|
||||||
|
|
||||||
|
# Test 'nix flake info' on a local flake.
|
||||||
|
(cd $flake1Dir && nix flake info) | grep -q 'ID: *flake1'
|
||||||
|
(cd $flake1Dir && nix flake info .) | grep -q 'ID: *flake1'
|
||||||
|
nix flake info $flake1Dir | grep -q 'ID: *flake1'
|
||||||
|
|
||||||
# Test 'nix flake info --json'.
|
# Test 'nix flake info --json'.
|
||||||
json=$(nix flake info --flake-registry $registry flake1 --json | jq .)
|
json=$(nix flake info --flake-registry $registry flake1 --json | jq .)
|
||||||
[[ $(echo "$json" | jq -r .description) = 'Bla bla' ]]
|
[[ $(echo "$json" | jq -r .description) = 'Bla bla' ]]
|
||||||
|
|
Loading…
Reference in a new issue