lib/tests/strings.sh: don't pin the exact error wording

The test asserted the exact stderr of `nix-instantiate` when coercing a
missing path. That wording is implementation-defined and subject to
change: it differs between CppNix and Lix, and it can change between CppNix
releases too.

Only check that evaluation fails and that the error names the missing
path.
This commit is contained in:
Raito Bezarius
2026-10-15 02:35:03 +02:00
parent e4479e040b
commit 48cb369917

View File

@@ -54,7 +54,9 @@ expectFailure() {
fi
}
expectFailure 'escapeShellArg /does-not-exist' "error: path '/does-not-exist' does not exist"
# The exact wording is implementation-defined, so only check that the error
# names the missing path.
expectFailure 'escapeShellArg /does-not-exist' "error:.*/does-not-exist"
# Without this, there would be no need to escape the path.
export NIX_STORE_DIR="$work/store with spaces"