diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-07-27 14:29:32 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-07-27 14:29:32 +0000 |
commit | d5bb67cfa4da130a9949a9b4eb8aba6cb74ea5c7 (patch) | |
tree | ed365ca233fa7edfba9551539c4a903f109abef0 /tests/local-store.sh | |
parent | 048e916f6477acc7e57e1d85e832d3efb42ad3f6 (diff) | |
parent | d7c0f094cbcfe1ae4ccc3d54baec00b66ccb1ed0 (diff) |
Merge remote-tracking branch 'upstream/master' into optional-derivation-output-storepath
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 ] |