about summary refs log tree commit diff
path: root/tests/fall-back.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/fall-back.sh')
-rw-r--r--tests/fall-back.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/fall-back.sh b/tests/fall-back.sh
new file mode 100644
index 000000000000..a183e12f670c
--- /dev/null
+++ b/tests/fall-back.sh
@@ -0,0 +1,14 @@
+storeExpr=$($TOP/src/nix-instantiate/nix-instantiate fall-back.nix)
+
+echo "store expr is $storeExpr"
+
+# Register a non-existant successor.
+suc=$NIX_STORE_DIR/deadbeafdeadbeafdeadbeafdeadbeaf-s.store
+$TOP/src/nix-store/nix-store --successor $storeExpr $suc
+
+outPath=$($TOP/src/nix-store/nix-store -qnfvvvvv "$storeExpr")
+
+echo "output path is $outPath"
+
+text=$(cat "$outPath"/hello)
+if test "$text" != "Hello World!"; then exit 1; fi