about summary refs log tree commit diff
path: root/tests/add.sh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-03-01T15·43+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-03-01T15·43+0000
commitea9c35d3cc2ef65643718e696007ba3569099e1e (patch)
treec29e2e7c4f03afd505f3be900413132588a86404 /tests/add.sh
parent30d051ff14d5a0f8912c9ba3c3a6ca97c2b7dbf0 (diff)
* Test `nix-store --add' and `nix-store -q --hash'.
Diffstat (limited to 'tests/add.sh')
-rw-r--r--tests/add.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/add.sh b/tests/add.sh
new file mode 100644
index 000000000000..b6ae3ebea4ea
--- /dev/null
+++ b/tests/add.sh
@@ -0,0 +1,13 @@
+source common.sh
+
+file=./add.sh
+
+path=$($nixstore --add $file)
+
+echo $path
+
+hash=$($nixstore -q --hash $path)
+
+echo $hash
+
+test "$hash" = "sha256:$(nix-hash --type sha256 --base32 $file)"