mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-28 22:03:12 +00:00
8bf8b10f68
See the changelog additions for user-visible changes. Since we enable/disable terminal protocols whenever we pass terminal ownership, tests can no longer run in parallel on the same terminal. For the same reason, readline shortcuts in the gdb REPL will not work anymore. As a remedy, use gdbserver, or lobby for CSI u support in libreadline. Add sleep to some tests, otherwise they fall (both in CI and locally). There are two weird failures on FreeBSD remaining, disable them for now https://github.com/fish-shell/fish-shell/pull/10359/checks?check_run_id=23330096362 Design and implementation borrows heavily from Kakoune. In future, we should try to implement more of the kitty progressive enhancements. Closes #10359
61 lines
1.6 KiB
Fish
61 lines
1.6 KiB
Fish
#RUN: %fish %s | %filter-ctrlseqs
|
|
set -l filename (echo foo | psub --testing)
|
|
test -f $filename
|
|
or echo 'psub is not a regular file' >&2
|
|
rm $filename
|
|
|
|
set -l filename (echo foo | psub --testing --file)
|
|
test -f $filename
|
|
or echo 'psub is not a regular file' >&2
|
|
rm $filename
|
|
|
|
set -l filename (echo foo | psub --testing --fifo)
|
|
test -p $filename
|
|
or echo 'psub is not a fifo' >&2
|
|
# hack: the background write that psub peforms may block
|
|
# until someone opens the fifo for reading. So make sure we
|
|
# actually read it.
|
|
cat $filename >/dev/null
|
|
rm $filename
|
|
|
|
cat (echo foo | psub)
|
|
cat (echo bar | psub --fifo)
|
|
cat (echo baz | psub)
|
|
#CHECK: foo
|
|
#CHECK: bar
|
|
#CHECK: baz
|
|
|
|
set -l filename (echo foo | psub)
|
|
if test -e $filename
|
|
echo 'psub file was not deleted'
|
|
else
|
|
echo 'psub file was deleted'
|
|
end
|
|
#CHECK: psub file was deleted
|
|
|
|
# The --file flag is the default behavior.
|
|
if count (echo foo | psub -s .cc | string match -r '\.cc$') >/dev/null
|
|
echo 'psub filename ends with .cc'
|
|
else
|
|
echo 'psub filename does not end with .cc'
|
|
end
|
|
#CHECK: psub filename ends with .cc
|
|
|
|
# Make sure we get the same result if we explicitly ask for a temp file.
|
|
if count (echo foo | psub -f -s .cc | string match -r '\.cc$') >/dev/null
|
|
echo 'psub filename ends with .cc'
|
|
else
|
|
echo 'psub filename does not end with .cc'
|
|
end
|
|
#CHECK: psub filename ends with .cc
|
|
|
|
set -l filename (echo foo | psub -s .fish)
|
|
if test -e (dirname $filename)
|
|
echo 'psub directory was not deleted'
|
|
else
|
|
echo 'psub directory was deleted'
|
|
end
|
|
#CHECK: psub directory was deleted
|
|
|
|
set -l diffs (comm -3 (__fish_print_help psub | psub) (psub -hs banana | psub))
|
|
test -z "$diffs"
|