diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2022-01-10 16:55:28 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2022-01-10 16:55:28 +0100 |
commit | f39d94a55be7db1759e3fcd8aea24bfb0da7b8c2 (patch) | |
tree | fd6380a2b51e35dda3d8f1a5f18537c3935aa127 /tests/readfile-context.sh | |
parent | 19fd6e585d8f4cad3e358361b6f983b0d7d3b8a9 (diff) | |
parent | 120ca245d13708743a59e83da12ec90902636236 (diff) |
Merge branch 'readfile' of https://github.com/abbradar/nix
Diffstat (limited to 'tests/readfile-context.sh')
-rw-r--r-- | tests/readfile-context.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/readfile-context.sh b/tests/readfile-context.sh new file mode 100644 index 000000000..31e70ddb1 --- /dev/null +++ b/tests/readfile-context.sh @@ -0,0 +1,16 @@ +source common.sh + +clearStore + +outPath=$(nix-build --no-out-link readfile-context.nix) + +# Set a GC root. +ln -s $outPath "$NIX_STATE_DIR"/gcroots/foo + +# Check that file exists. +[ "$(cat $(cat $outPath))" = "Hello World!" ] + +nix-collect-garbage + +# Check that file still exists. +[ "$(cat $(cat $outPath))" = "Hello World!" ] |