diff --git a/tests/lang/eval-okay-types.exp b/tests/lang/eval-okay-types.exp new file mode 100644 index 0000000000..0287a32b11 --- /dev/null +++ b/tests/lang/eval-okay-types.exp @@ -0,0 +1 @@ +[ true false true false true false true false true false "int" "bool" "string" "null" "attrs" "list" "lambda" "lambda" "lambda" "lambda" ] diff --git a/tests/lang/eval-okay-types.nix b/tests/lang/eval-okay-types.nix new file mode 100644 index 0000000000..c3fe370ef7 --- /dev/null +++ b/tests/lang/eval-okay-types.nix @@ -0,0 +1,23 @@ +with builtins; + +[ (isNull null) + (isNull (x: x)) + (isFunction (x: x)) + (isFunction "fnord") + (isString ("foo" + "bar")) + (isString [ "x" ]) + (isInt (1 + 2)) + (isInt { x = 123; }) + (isBool (true && false)) + (isBool null) + (typeOf (3 * 4)) + (typeOf true) + (typeOf "xyzzy") + (typeOf null) + (typeOf { x = 456; }) + (typeOf [ 1 2 3 ]) + (typeOf (x: x)) + (typeOf ((x: y: x) 1)) + (typeOf map) + (typeOf (map (x: x))) +]