aboutsummaryrefslogtreecommitdiff
path: root/tests/functional/toString-path.sh
blob: 07eb8746588a926f964adeed7d616265f8bf6ea5 (plain)
1
2
3
4
5
6
7
8
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 ]]

[[ $(nix eval --json --impure --expr "builtins.readDir (builtins.toString (builtins.fetchTree { type = \"path\"; path = \"$TEST_ROOT/foo\"; }))") = '{"bar":"regular"}' ]]