* More test coverage.
This commit is contained in:
parent
80b5c71684
commit
fa95f4be3f
5
tests/lang/eval-fail-assert.nix
Normal file
5
tests/lang/eval-fail-assert.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
let {
|
||||||
|
x = arg: assert arg == "y"; 123;
|
||||||
|
|
||||||
|
body = x "x";
|
||||||
|
}
|
1
tests/lang/eval-okay-attrs.exp
Normal file
1
tests/lang/eval-okay-attrs.exp
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Int(987)
|
5
tests/lang/eval-okay-attrs.nix
Normal file
5
tests/lang/eval-okay-attrs.nix
Normal file
|
@ -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;
|
||||||
|
}
|
1
tests/lang/eval-okay-if.exp
Normal file
1
tests/lang/eval-okay-if.exp
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Int(3)
|
1
tests/lang/eval-okay-if.nix
Normal file
1
tests/lang/eval-okay-if.nix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
if "foo" != "f" + "oo" then 1 else if false then 2 else 3
|
1
tests/lang/eval-okay-logic.exp
Normal file
1
tests/lang/eval-okay-logic.exp
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Int(1)
|
1
tests/lang/eval-okay-logic.nix
Normal file
1
tests/lang/eval-okay-logic.nix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
assert !false && (true || false) -> true; 1
|
Loading…
Reference in a new issue