mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-01-20 01:02:45 +08:00
Output more information in read --nchars test
To try to track down a test failure, improve the error message.
This commit is contained in:
parent
4a3e55f69c
commit
954d0fb042
|
@ -244,7 +244,9 @@ if test $status -ne 0
|
|||
echo the read of the max amount of data failed unexpectedly
|
||||
end
|
||||
if test (string length "$x") -ne $fish_read_limit
|
||||
echo reading the max amount of data with --nchars failed the length test: (string length "$x") / $fish_read_limit
|
||||
# See how much data 'yes' produced.
|
||||
set yeslen (yes $line | dd bs=1024 count=(math "$fish_read_limit / 1024") 2>/dev/null | wc -c | tr -d " \t\n\r")
|
||||
echo reading the max amount of data with --nchars failed the length test. read: (string length "$x"), limit: $fish_read_limit, yes produced: $yeslen
|
||||
end
|
||||
|
||||
# Confirm reading non-interactively works -- \#4206 regression
|
||||
|
|
Loading…
Reference in New Issue
Block a user