diff options
author | Philip Taron <philip.taron@gmail.com> | 2024-03-11 16:30:31 -0700 |
---|---|---|
committer | Philip Taron <philip.taron@gmail.com> | 2024-03-11 16:30:31 -0700 |
commit | c8a8550c284f2dfeba02eb3d0930efc132727e46 (patch) | |
tree | 8784911bad7e90702bebbc2d892fee9b5228280e /lib/tests | |
parent | f5736d920ce778abd597e38adf69e5213736b223 (diff) |
Avoid top-level `with` in lib/tests/misc.nix
Diffstat (limited to 'lib/tests')
-rw-r--r-- | lib/tests/misc.nix | 89 |
1 files changed, 88 insertions, 1 deletions
diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix index 98d1f4e71c488..6f1d9039db802 100644 --- a/lib/tests/misc.nix +++ b/lib/tests/misc.nix @@ -13,9 +13,96 @@ Alternatively, to run all `lib` tests: [nixpkgs]$ nix-build lib/tests/release.nix */ -with import ../default.nix; let + lib = import ../default.nix; + + inherit (lib) + allUnique + and + attrNames + attrsets + attrsToList + bitAnd + bitOr + bitXor + boolToString + callPackagesWith + callPackageWith + cartesianProductOfSets + cli + composeExtensions + composeManyExtensions + concatLines + concatMapAttrs + concatMapStrings + concatStrings + concatStringsSep + const + escapeXML + evalModules + filter + fix + fold + foldAttrs + foldl + foldl' + foldlAttrs + foldr + functionArgs + generators + genList + getExe + getExe' + groupBy + groupBy' + hasAttrByPath + hasInfix + id + isStorePath + lazyDerivation + lists + listToAttrs + makeExtensible + makeOverridable + mapAttrs + matchAttrs + mergeAttrs + meta + mkOption + mod + nameValuePair + optionalDrvAttr + optionAttrSetToDocList + overrideExisting + packagesFromDirectoryRecursive + pipe + range + recursiveUpdateUntil + removePrefix + replicate + runTests + setFunctionArgs + showAttrPath + sort + sortOn + stringLength + strings + stringToCharacters + systems + tail + take + testAllTrue + toBaseDigits + toHexString + toInt + toIntBase10 + toShellVars + types + updateManyAttrsByPath + versions + ; + testingThrow = expr: { expr = (builtins.tryEval (builtins.seq expr "didn't throw")); expected = { success = false; value = false; }; |