forked from lix-project/lix
Test relative store paths
This commit is contained in:
parent
fefd6c9e5f
commit
4178f36a1d
20
tests/local-store.sh
Normal file
20
tests/local-store.sh
Normal file
|
@ -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 ]
|
|
@ -6,7 +6,7 @@ nix_tests = \
|
|||
gc-auto.sh \
|
||||
referrers.sh user-envs.sh logging.sh nix-build.sh misc.sh fixed.sh \
|
||||
gc-runtime.sh check-refs.sh filter-source.sh \
|
||||
remote-store.sh export.sh export-graph.sh \
|
||||
local-store.sh remote-store.sh export.sh export-graph.sh \
|
||||
timeout.sh secure-drv-outputs.sh nix-channel.sh \
|
||||
multiple-outputs.sh import-derivation.sh fetchurl.sh optimise-store.sh \
|
||||
binary-cache.sh nix-profile.sh repair.sh dump-db.sh case-hack.sh \
|
||||
|
|
Loading…
Reference in a new issue