Merge pull request #15254 from roberth/fix-test-nix-shell-in-pwd-with-plus

fix(tests): use glob instead of regex in nix-shell test
This commit is contained in:
Sergei Zimmerman
2026-02-25 22:59:33 +00:00
committed by GitHub

View File

@@ -39,8 +39,8 @@ testTmpDir=$(pwd)/nix-shell
mkdir -p "$testTmpDir"
# shellcheck disable=SC2016
output=$(TMPDIR="$testTmpDir" nix-shell --pure "$shellDotNix" -A shellDrv --run 'echo $NIX_BUILD_TOP')
[[ "$output" =~ ${testTmpDir}.* ]] || {
echo "expected $output =~ ${testTmpDir}.*" >&2
[[ "$output" == "${testTmpDir}"/* ]] || {
echo "expected $output == ${testTmpDir}/*" >&2
exit 1
}