diff options
Diffstat (limited to 'third_party/nix/src/tests/lang')
4 files changed, 13 insertions, 3 deletions
diff --git a/third_party/nix/src/tests/lang/eval-okay-functionargs.exp b/third_party/nix/src/tests/lang/eval-okay-functionargs.exp index c1c9f8ffaf69..f8ddea8e0bfa 100644 --- a/third_party/nix/src/tests/lang/eval-okay-functionargs.exp +++ b/third_party/nix/src/tests/lang/eval-okay-functionargs.exp @@ -1 +1 @@ -[ "stdenv" "fetchurl" "aterm-stdenv" "aterm-stdenv2" "libX11" "libXv" "mplayer-stdenv2.libXv-libX11" "mplayer-stdenv2.libXv-libX11_2" "nix-stdenv-aterm-stdenv" "nix-stdenv2-aterm2-stdenv2" ] +[ { aterm = false; fetchurl = false; stdenv = false; } { color = false; name = true; } { } { } { } "stdenv" "fetchurl" "aterm-stdenv" "aterm-stdenv2" "libX11" "libXv" "mplayer-stdenv2.libXv-libX11" "mplayer-stdenv2.libXv-libX11_2" "nix-stdenv-aterm-stdenv" "nix-stdenv2-aterm2-stdenv2" ] diff --git a/third_party/nix/src/tests/lang/eval-okay-functionargs.nix b/third_party/nix/src/tests/lang/eval-okay-functionargs.nix index 68dca62ee18d..205bbf307aa7 100644 --- a/third_party/nix/src/tests/lang/eval-okay-functionargs.nix +++ b/third_party/nix/src/tests/lang/eval-okay-functionargs.nix @@ -6,6 +6,14 @@ let atermFun = { stdenv, fetchurl }: { name = "aterm-${stdenv.name}"; }; aterm2Fun = { stdenv, fetchurl }: { name = "aterm2-${stdenv.name}"; }; nixFun = { stdenv, fetchurl, aterm }: { name = "nix-${stdenv.name}-${aterm.name}"; }; + + trivialFunctionArgsUsage = [ + (builtins.functionArgs nixFun) + (builtins.functionArgs ({ name ? "Karl", color }: "${name} is ${color}")) + (builtins.functionArgs (x: y: x + y)) + (builtins.functionArgs builtins.map) + (builtins.functionArgs builtins.fetchurl) + ]; mplayerFun = { stdenv, fetchurl, enableX11 ? false, xorg ? null, enableFoo ? true, foo ? null }: @@ -67,7 +75,8 @@ let in - [ pkgs.stdenv.name + trivialFunctionArgsUsage ++ [ + pkgs.stdenv.name pkgs.fetchurl.name pkgs.aterm.name pkgs2.aterm.name diff --git a/third_party/nix/src/tests/lang/eval-okay-types.exp b/third_party/nix/src/tests/lang/eval-okay-types.exp index 92a15329935a..882c16dbfe36 100644 --- a/third_party/nix/src/tests/lang/eval-okay-types.exp +++ b/third_party/nix/src/tests/lang/eval-okay-types.exp @@ -1 +1 @@ -[ true false true false true false true false true true true true true true true true true true true false true true true false "int" "bool" "string" "null" "set" "list" "lambda" "lambda" "lambda" "lambda" ] +[ true false true true false true false true false true true true true true true true true true true true false true true true false "int" "bool" "string" "null" "set" "list" "lambda" "lambda" "lambda" "lambda" ] diff --git a/third_party/nix/src/tests/lang/eval-okay-types.nix b/third_party/nix/src/tests/lang/eval-okay-types.nix index 9b58be5d1dd4..cc51d8cb7a25 100644 --- a/third_party/nix/src/tests/lang/eval-okay-types.nix +++ b/third_party/nix/src/tests/lang/eval-okay-types.nix @@ -3,6 +3,7 @@ with builtins; [ (isNull null) (isNull (x: x)) (isFunction (x: x)) + (isFunction functionArgs) (isFunction "fnord") (isString ("foo" + "bar")) (isString [ "x" ]) |