Add some tests

This commit is contained in:
Eelco Dolstra 2019-05-16 23:14:27 +02:00
parent 2468672e30
commit bc0fb109a9

View File

@ -104,6 +104,11 @@ EOF
# Test 'nix flake info'.
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'.
json=$(nix flake info --flake-registry $registry flake1 --json | jq .)
[[ $(echo "$json" | jq -r .description) = 'Bla bla' ]]