mirror of
https://github.com/NixOS/nix
synced 2025-06-25 19:01:16 +02:00
tests/functional: Add regression test for broken :sh
in repl
Can't really test `:u` because it needs <nixpkgs>.
(cherry picked from commit d371aadb2b
)
This commit is contained in:
parent
49fa3e1869
commit
20ce98f87b
1 changed files with 4 additions and 0 deletions
|
@ -56,6 +56,10 @@ testRepl () {
|
||||||
nix repl "${nixArgs[@]}" 2>&1 <<< "builtins.currentSystem" \
|
nix repl "${nixArgs[@]}" 2>&1 <<< "builtins.currentSystem" \
|
||||||
| grep "$(nix-instantiate --eval -E 'builtins.currentSystem')"
|
| grep "$(nix-instantiate --eval -E 'builtins.currentSystem')"
|
||||||
|
|
||||||
|
# regression test for #12163
|
||||||
|
replOutput=$(nix repl "${nixArgs[@]}" 2>&1 <<< ":sh import $testDir/simple.nix")
|
||||||
|
echo "$replOutput" | grepInverse "error: Cannot run 'nix-shell'"
|
||||||
|
|
||||||
expectStderr 1 nix repl "${testDir}/simple.nix" \
|
expectStderr 1 nix repl "${testDir}/simple.nix" \
|
||||||
| grepQuiet -s "error: path '$testDir/simple.nix' is not a flake"
|
| grepQuiet -s "error: path '$testDir/simple.nix' is not a flake"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue