about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorMarc Weber <marco-oweber@gmx.de>2013-02-06T23·03+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-02-08T18·26+0100
commit01a5ea9914b3933e63a88184861900615be76e12 (patch)
tree3c491ce644fe995d67fe53c0d33bb3162421de78 /tests
parent8add116acd050bdcca84b8a092420566a6e6692c (diff)
experimental/hash
adding primop function calculating hash of a string

Signed-off-by: Marc Weber <marco-oweber@gmx.de>
Diffstat (limited to 'tests')
-rw-r--r--tests/lang/eval-okay-hash.exp1
-rw-r--r--tests/lang/eval-okay-hash.nix6
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/lang/eval-okay-hash.exp b/tests/lang/eval-okay-hash.exp
new file mode 100644
index 0000000000..369b983d5b
--- /dev/null
+++ b/tests/lang/eval-okay-hash.exp
@@ -0,0 +1 @@
+[ "6c69ee7f211c640419d5366cc076ae46" "bb3438fbabd460ea6dbd27d153e2233b" "900a4469df00ccbfd0c145c6d1e4b7953dd0afafadd7534e3a4019e8d38fc663" "ad0387b3bd8652f730ca46d25f9c170af0fd589f42e7f23f5a9e6412d97d7e56" ]
diff --git a/tests/lang/eval-okay-hash.nix b/tests/lang/eval-okay-hash.nix
new file mode 100644
index 0000000000..65cd8afeb0
--- /dev/null
+++ b/tests/lang/eval-okay-hash.nix
@@ -0,0 +1,6 @@
+let
+  md5 = builtins.hash "md5";
+  sha256 = builtins.hash "sha256";
+  strings = [ "text 1" "text 2" ];
+in
+  (builtins.map md5 strings) ++ (builtins.map sha256 strings)