fish-shell/tests/test_cmdsub.err
Fabian Homborg 7095de628c Remove "called on standard input" message
This was printed basically everywhere.

The user knows what they executed on standard input.

A good example:

```fish
set c (subme 513)
```

used to print

```
fish: Too much data emitted by command substitution so it was discarded

    set -l x (string repeat -n $argv x)
             ^
in function 'subme'
	called on standard input
	with parameter list '513'
in command substitution
	called on standard input
```

and now it is

```
fish: Too much data emitted by command substitution so it was discarded

    set -l x (string repeat -n $argv x)
             ^
in function 'subme' with arguments '513'
in command substitution
```

See #5434.
2019-03-26 17:38:41 +01:00

29 lines
841 B
Text

####################
# Command sub just under the limit should succeed
####################
# Command sub at the limit should fail
fish: Too much data emitted by command substitution so it was discarded
set b (string repeat -n 512 x)
^
####################
# Command sub over the limit should fail
fish: Too much data emitted by command substitution so it was discarded
set -l x (string repeat -n $argv x)
^
in function 'subme' with arguments '513'
in command substitution
####################
# Make sure output from builtins outside of command substitution is not affected
####################
# Same builtin in a command substitution is affected
fish: Too much data emitted by command substitution so it was discarded
echo this will fail (string repeat --max 513 b) to output anything
^