Loading pkgs/build-support/testers/testEqualArrayOrMap/build-command.sh +3 −6 Original line number Diff line number Diff line Loading @@ -2,13 +2,10 @@ set -eu preScript() { # If neither expectedArray nor expectedMap are declared, the test is meaningless. if ! isDeclaredArray expectedArray && ! isDeclaredMap expectedMap; then nixErrorLog "neither expectedArray nor expectedMap were set, so test is meaningless!" exit 1 fi # NOTE: If neither expectedArray nor expectedMap are declared, the test is meaningless. # This precondition is checked in the Nix expression through an assert. preScript() { if isDeclaredArray valuesArray; then # shellcheck disable=SC2154 nixLog "using valuesArray: $(declare -p valuesArray)" Loading pkgs/build-support/testers/testEqualArrayOrMap/tester.nix +4 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ stdenvNoCC, }: let inherit (lib.asserts) assertMsg; inherit (lib.customisation) makeOverridable; testEqualArrayOrMap = Loading @@ -15,6 +16,9 @@ let expectedMap ? null, script, }: assert assertMsg ( expectedArray != null || expectedMap != null ) "testEqualArrayOrMap: at least one of 'expectedArray' or 'expectedMap' must be provided"; stdenvNoCC.mkDerivation { __structuredAttrs = true; strictDeps = true; Loading Loading
pkgs/build-support/testers/testEqualArrayOrMap/build-command.sh +3 −6 Original line number Diff line number Diff line Loading @@ -2,13 +2,10 @@ set -eu preScript() { # If neither expectedArray nor expectedMap are declared, the test is meaningless. if ! isDeclaredArray expectedArray && ! isDeclaredMap expectedMap; then nixErrorLog "neither expectedArray nor expectedMap were set, so test is meaningless!" exit 1 fi # NOTE: If neither expectedArray nor expectedMap are declared, the test is meaningless. # This precondition is checked in the Nix expression through an assert. preScript() { if isDeclaredArray valuesArray; then # shellcheck disable=SC2154 nixLog "using valuesArray: $(declare -p valuesArray)" Loading
pkgs/build-support/testers/testEqualArrayOrMap/tester.nix +4 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ stdenvNoCC, }: let inherit (lib.asserts) assertMsg; inherit (lib.customisation) makeOverridable; testEqualArrayOrMap = Loading @@ -15,6 +16,9 @@ let expectedMap ? null, script, }: assert assertMsg ( expectedArray != null || expectedMap != null ) "testEqualArrayOrMap: at least one of 'expectedArray' or 'expectedMap' must be provided"; stdenvNoCC.mkDerivation { __structuredAttrs = true; strictDeps = true; Loading