diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-03-01T16·26+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-03-01T16·26+0000 |
commit | fa95f4be3f4df6ebe4d49ec57a66129f645e36c7 (patch) | |
tree | 28aa16b4345f8bf7d802940cf805811321507990 /tests | |
parent | 80b5c7168436d4fa34952c2d7d8c26d9894afe3e (diff) |
* More test coverage.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lang/eval-fail-assert.nix | 5 | ||||
-rw-r--r-- | tests/lang/eval-okay-attrs.exp | 1 | ||||
-rw-r--r-- | tests/lang/eval-okay-attrs.nix | 5 | ||||
-rw-r--r-- | tests/lang/eval-okay-if.exp | 1 | ||||
-rw-r--r-- | tests/lang/eval-okay-if.nix | 1 | ||||
-rw-r--r-- | tests/lang/eval-okay-logic.exp | 1 | ||||
-rw-r--r-- | tests/lang/eval-okay-logic.nix | 1 |
7 files changed, 15 insertions, 0 deletions
diff --git a/tests/lang/eval-fail-assert.nix b/tests/lang/eval-fail-assert.nix new file mode 100644 index 000000000000..3b7a1e8bf0c2 --- /dev/null +++ b/tests/lang/eval-fail-assert.nix @@ -0,0 +1,5 @@ +let { + x = arg: assert arg == "y"; 123; + + body = x "x"; +} \ No newline at end of file diff --git a/tests/lang/eval-okay-attrs.exp b/tests/lang/eval-okay-attrs.exp new file mode 100644 index 000000000000..add36384d296 --- /dev/null +++ b/tests/lang/eval-okay-attrs.exp @@ -0,0 +1 @@ +Int(987) \ No newline at end of file diff --git a/tests/lang/eval-okay-attrs.nix b/tests/lang/eval-okay-attrs.nix new file mode 100644 index 000000000000..810b31a5da96 --- /dev/null +++ b/tests/lang/eval-okay-attrs.nix @@ -0,0 +1,5 @@ +let { + as = { x = 123; y = 456; } // { z = 789; } // { z = 987; }; + + body = if as ? a then as.a else assert as ? z; as.z; +} diff --git a/tests/lang/eval-okay-if.exp b/tests/lang/eval-okay-if.exp new file mode 100644 index 000000000000..8b99801d3596 --- /dev/null +++ b/tests/lang/eval-okay-if.exp @@ -0,0 +1 @@ +Int(3) \ No newline at end of file diff --git a/tests/lang/eval-okay-if.nix b/tests/lang/eval-okay-if.nix new file mode 100644 index 000000000000..23e4c74d5016 --- /dev/null +++ b/tests/lang/eval-okay-if.nix @@ -0,0 +1 @@ +if "foo" != "f" + "oo" then 1 else if false then 2 else 3 diff --git a/tests/lang/eval-okay-logic.exp b/tests/lang/eval-okay-logic.exp new file mode 100644 index 000000000000..f1161b8d5588 --- /dev/null +++ b/tests/lang/eval-okay-logic.exp @@ -0,0 +1 @@ +Int(1) \ No newline at end of file diff --git a/tests/lang/eval-okay-logic.nix b/tests/lang/eval-okay-logic.nix new file mode 100644 index 000000000000..fbb12794401f --- /dev/null +++ b/tests/lang/eval-okay-logic.nix @@ -0,0 +1 @@ +assert !false && (true || false) -> true; 1 |