···11#!/usr/bin/env bash2233-# Property tests for the `lib.path` library44-#33+# Property tests for lib/path/default.nix54# It generates random path-like strings and runs the functions on65# them, checking that the expected laws of the functions hold66+# Run:77+# [nixpkgs]$ lib/path/tests/prop.sh88+# or:99+# [nixpkgs]$ nix-build lib/tests/release.nix710811set -euo pipefail912shopt -s inherit_errexit
+15-3
lib/tests/misc.nix
···11-# to run these tests:22-# nix-instantiate --eval --strict nixpkgs/lib/tests/misc.nix33-# if the resulting list is empty, all tests passed11+/*22+Nix evaluation tests for various lib functions.33+44+Since these tests are implemented with Nix evaluation, error checking is limited to what `builtins.tryEval` can detect, which is `throw`'s and `abort`'s, without error messages.55+If you need to test error messages or more complex evaluations, see ./modules.sh, ./sources.sh or ./filesystem.sh as examples.66+77+To run these tests:88+99+ [nixpkgs]$ nix-instantiate --eval --strict lib/tests/misc.nix1010+1111+If the resulting list is empty, all tests passed.1212+Alternatively, to run all `lib` tests:1313+1414+ [nixpkgs]$ nix-build lib/tests/release.nix1515+*/416with import ../default.nix;517618let
+7-1
lib/tests/modules.sh
···11#!/usr/bin/env bash22-#22+33# This script is used to test that the module system is working as expected.44+# Executing it runs tests for `lib.modules`, `lib.options` and `lib.types`.45# By default it test the version of nixpkgs which is defined in the NIX_PATH.66+#77+# Run:88+# [nixpkgs]$ lib/tests/modules.sh99+# or:1010+# [nixpkgs]$ nix-build lib/tests/release.nix511612set -o errexit -o noclobber -o nounset -o pipefail713shopt -s failglob inherit_errexit