1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 04:21:16 +02:00

* More primops.

This commit is contained in:
Eelco Dolstra 2010-03-30 14:39:27 +00:00
parent 5b72d8a749
commit c3aa615a5f
4 changed files with 56 additions and 97 deletions

View file

@ -56,10 +56,12 @@ void run(Strings args)
doTest("{ x = [ 1 2 ]; } == { x = [ 1 ] ++ [ 2 ]; }");
doTest("1 != 1");
doTest("true");
doTest("builtins.true");
doTest("true == false");
doTest("__head [ 1 2 3 ]");
doTest("__add 1 2");
doTest("null");
doTest("null");
doTest("\"foo\"");
doTest("let s = \"bar\"; in \"foo${s}\"");
doTest("if true then 1 else 2");
@ -67,9 +69,9 @@ void run(Strings args)
doTest("if false || true then 1 else 2");
doTest("let x = x; in if true || x then 1 else 2");
doTest("/etc/passwd");
doTest("import ./foo.nix");
//doTest("import ./foo.nix");
doTest("map (x: __add 1 x) [ 1 2 3 ]");
doTest("map (__add 1) [ 1 2 3 ]");
doTest("map (builtins.add 1) [ 1 2 3 ]");
}