mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-31 20:31:19 -03:00
tests/checks/read: add test for non-interactive use of commandline
This commit is contained in:
@@ -65,3 +65,10 @@ $fish -ic '
|
||||
# CHECK: hello
|
||||
# CHECK: helloworld
|
||||
# CHECK: hello world
|
||||
|
||||
$fish -c 'commandline foo'
|
||||
# CHECKERR: commandline: Can not set commandline in non-interactive mode
|
||||
# CHECKERR: Standard input (line 1):
|
||||
# CHECKERR: commandline foo
|
||||
# CHECKERR: ^
|
||||
# CHECKERR: (Type 'help commandline' for related documentation)
|
||||
|
||||
@@ -245,7 +245,7 @@ if test (string length "$x") -ne $fish_read_limit
|
||||
echo reading with a limited amount of input data failed the length test
|
||||
end
|
||||
|
||||
# Confirm reading non-interactively works -- \#4206 regression
|
||||
# Confirm reading non-interactively works -- #4206 regression
|
||||
echo abc\ndef | $fish -i -c 'read a; read b; set --show a; set --show b'
|
||||
#CHECK: $a: set in global scope, unexported, with 1 elements
|
||||
#CHECK: $a[1]: |abc|
|
||||
|
||||
Reference in New Issue
Block a user