diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-07-23 15:06:56 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-07-23 15:06:56 +0000 |
commit | c36916eca0edbbbbaf928405b7e2cc89840eac49 (patch) | |
tree | 1dc93325dfa2f57f23bd937844bbfde1f8ec1aa2 /tests/local-store.sh | |
parent | 9423f64ee2b9fe84618e06654fb6b55766b0cf44 (diff) | |
parent | 6fcd9966bf71336107088b218c59477d3f7a874f (diff) |
Merge branch 'misc-ca' of github.com:obsidiansystems/nix into derivation-primop-floating-output
Diffstat (limited to 'tests/local-store.sh')
-rw-r--r-- | tests/local-store.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/local-store.sh b/tests/local-store.sh new file mode 100644 index 000000000..4ec3d64b0 --- /dev/null +++ b/tests/local-store.sh @@ -0,0 +1,20 @@ +source common.sh + +cd $TEST_ROOT + +echo example > example.txt +mkdir -p ./x + +NIX_STORE_DIR=$TEST_ROOT/x + +CORRECT_PATH=$(nix-store --store ./x --add example.txt) + +PATH1=$(nix path-info --store ./x $CORRECT_PATH) +[ $CORRECT_PATH == $PATH1 ] + +PATH2=$(nix path-info --store "$PWD/x" $CORRECT_PATH) +[ $CORRECT_PATH == $PATH2 ] + +# FIXME we could also test the query parameter version: +# PATH3=$(nix path-info --store "local?store=$PWD/x" $CORRECT_PATH) +# [ $CORRECT_PATH == $PATH3 ] |