1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 10:11:47 +02:00

Fix accessing 'toString path'

This commit is contained in:
Eelco Dolstra 2022-09-02 19:03:41 +02:00
parent c0dd35a65f
commit 2d5cfca98b
7 changed files with 89 additions and 31 deletions

View file

@ -109,7 +109,8 @@ nix_tests = \
store-ping.sh \
fetchClosure.sh \
completions.sh \
impure-derivations.sh
impure-derivations.sh \
toString-path.sh
ifeq ($(HAVE_LIBCPUID), 1)
nix_tests += compute-levels.sh

6
tests/toString-path.sh Normal file
View file

@ -0,0 +1,6 @@
source common.sh
mkdir -p $TEST_ROOT/foo
echo bla > $TEST_ROOT/foo/bar
[[ $(nix eval --raw --impure --expr "builtins.readFile (builtins.toString (builtins.fetchTree { type = \"path\"; path = \"$TEST_ROOT/foo\"; } + \"bar\"))") = bla ]]