mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
tests: filter control sequences only when interactive
This demonstrates that we only write control sequences when interactive.
This commit is contained in:
parent
9158395d10
commit
1e858eae35
139 changed files with 167 additions and 163 deletions
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish %s | %filter-ctrlseqs
|
||||
#RUN: %fish %s
|
||||
|
||||
# Universal abbreviations are imported.
|
||||
set -U _fish_abbr_cuckoo somevalue
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish %s | %filter-ctrlseqs
|
||||
#RUN: %fish %s
|
||||
# Avoid regressions of issue \#3860 wherein the first word of the alias ends with a semicolon
|
||||
function foo
|
||||
echo ran foo
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish %s | %filter-ctrlseqs
|
||||
#RUN: %fish %s
|
||||
# "Basic && and || support"
|
||||
|
||||
echo first && echo second
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish %s | %filter-ctrlseqs
|
||||
#RUN: %fish %s
|
||||
|
||||
set -xl LANG C # uniform quotes
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish %s | %filter-ctrlseqs
|
||||
#RUN: %fish %s
|
||||
##########
|
||||
|
||||
# NOTE: This uses argparse, which touches the local variables.
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#RUN: %fish -Z | %filter-ctrlseqs
|
||||
#RUN: %fish -Z
|
||||
# CHECKERR: {{.*fish}}: {{unrecognized option: Z|invalid option -- '?Z'?|unknown option -- Z|illegal option -- Z|-Z: unknown option}}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# RUN: %fish -C 'set -g fish %fish' %s | %filter-ctrlseqs
|
||||
# RUN: %fish -C 'set -g fish %fish' %s
|
||||
#
|
||||
# Test function, loops, conditionals and some basic elements
|
||||
#
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish %s | %filter-ctrlseqs
|
||||
#RUN: %fish %s
|
||||
#REQUIRES: command -v diff
|
||||
|
||||
set -l fish (status fish-path)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish %s | %filter-ctrlseqs
|
||||
#RUN: %fish %s
|
||||
|
||||
echo x-{1}
|
||||
#CHECK: x-{1}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish -C 'set -g fish %fish' %s | %filter-ctrlseqs
|
||||
#RUN: %fish -C 'set -g fish %fish' %s
|
||||
begin
|
||||
set -l dir $PWD/(dirname (status -f))
|
||||
set -gx XDG_CONFIG_HOME $dir/broken-config/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish %s | %filter-ctrlseqs
|
||||
#RUN: %fish %s
|
||||
# Tests for the "builtin" builtin/keyword.
|
||||
builtin -q string; and echo String exists
|
||||
#CHECK: String exists
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish %s | %filter-ctrlseqs
|
||||
#RUN: %fish %s
|
||||
echo (function foo1 --on-job-exit caller; end; functions --handlers-type caller-exit | grep foo)
|
||||
# CHECK: caller-exit foo1
|
||||
echo (function foo2 --on-job-exit caller; end; functions --handlers-type process-exit | grep foo)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish %s | %filter-ctrlseqs
|
||||
#RUN: %fish %s
|
||||
|
||||
# Verify the '--on-job-exit caller' misfeature.
|
||||
function make_call_observer -a type
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# RUN: %fish -C 'set -g fish %fish' %s | %filter-ctrlseqs
|
||||
# RUN: %fish -C 'set -g fish %fish' %s
|
||||
|
||||
set -g fish (realpath $fish)
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish -C 'set -l fish %fish' %s | %filter-ctrlseqs
|
||||
#RUN: %fish -C 'set -l fish %fish' %s
|
||||
# Test ALL THE FISH FILES
|
||||
# in share/, that is - the tests are exempt because they contain syntax errors, on purpose
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish -C 'set -l fish %fish' %s | %filter-ctrlseqs
|
||||
#RUN: %fish -C 'set -l fish %fish' %s
|
||||
# Test all completions where the command exists
|
||||
|
||||
# No output is good output
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish -C 'set -l fish %fish' %s | %filter-ctrlseqs
|
||||
#RUN: %fish -C 'set -l fish %fish' %s
|
||||
#REQUIRES: msgfmt --help
|
||||
|
||||
set -l fail_count 0
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# RUN: %fish %s | %filter-ctrlseqs
|
||||
# RUN: %fish %s
|
||||
|
||||
# This tests various corner cases involving command substitution.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish %s | %filter-ctrlseqs
|
||||
#RUN: %fish %s
|
||||
|
||||
echo $(echo 1\n2)
|
||||
# CHECK: 1 2
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#RUN: %fish -c "echo 1.2.3.4." | %filter-ctrlseqs
|
||||
#RUN: %fish -c "echo 1.2.3.4."
|
||||
# CHECK: 1.2.3.4.
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#RUN: %fish -c "echo 1.2.3.4." -c "echo 5.6.7.8." | %filter-ctrlseqs
|
||||
#RUN: %fish -c "echo 1.2.3.4." -c "echo 5.6.7.8."
|
||||
# CHECK: 1.2.3.4.
|
||||
# CHECK: 5.6.7.8.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# RUN: %fish -C 'set -g fish %fish' %s | %filter-ctrlseqs
|
||||
# RUN: %fish -C 'set -g fish %fish' %s | %filter-control-sequences
|
||||
set -g PATH
|
||||
$fish -c "nonexistent-command-1234 banana rama"
|
||||
#CHECKERR: fish: Unknown command: nonexistent-command-1234
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#RUN: %fish -c 'set foo bar' -c 'echo $foo' | %filter-ctrlseqs
|
||||
#RUN: %fish -c 'set foo bar' -c 'echo $foo'
|
||||
# CHECK: bar
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish %s | %filter-ctrlseqs
|
||||
#RUN: %fish %s
|
||||
|
||||
commandline --input "echo foo | bar" --is-valid
|
||||
and echo Valid
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish -C 'set -l fish %fish' %s | %filter-ctrlseqs
|
||||
#RUN: %fish -C 'set -l fish %fish' %s
|
||||
|
||||
function fooc; true; end;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish -C 'set -l fish %fish' %s | %filter-ctrlseqs
|
||||
#RUN: %fish -C 'set -l fish %fish' %s
|
||||
function complete_test_alpha1
|
||||
echo $argv
|
||||
end
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish --interactive %s | %filter-ctrlseqs
|
||||
#RUN: %fish --interactive %s | %filter-control-sequences
|
||||
# ^ interactive so we can do `complete`
|
||||
mkdir -p __fish_complete_directories/
|
||||
cd __fish_complete_directories
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish %s | %filter-ctrlseqs
|
||||
#RUN: %fish %s
|
||||
function commandline
|
||||
if test $argv[1] = -ct
|
||||
echo --long4\n-4
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish %s | %filter-ctrlseqs
|
||||
#RUN: %fish %s
|
||||
# Validate the behavior of the `count` command.
|
||||
|
||||
# no args
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# RUN: %fish %s | %filter-ctrlseqs
|
||||
# RUN: %fish %s
|
||||
|
||||
# Ensure we don't hang on deep command substitutions - see #6503.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish -C 'set -g fish %fish' %s | %filter-ctrlseqs
|
||||
#RUN: %fish -C 'set -g fish %fish' %s
|
||||
|
||||
if command -q getconf
|
||||
# (no env -u, some systems don't support that)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish %s | %filter-ctrlseqs
|
||||
#RUN: %fish %s
|
||||
begin
|
||||
end >.
|
||||
status -b; and echo "status -b returned true after bad redirect on a begin block"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# RUN: env fish_test_helper=%fish_test_helper %fish %s | %filter-ctrlseqs
|
||||
# RUN: env fish_test_helper=%fish_test_helper %fish %s
|
||||
|
||||
# Ensure that a job which attempts to disown itself does not explode.
|
||||
# Here fish_test_helper is the process group leader; we attempt to disown
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# RUN: %fish %s | %filter-ctrlseqs
|
||||
# RUN: %fish %s
|
||||
|
||||
# See issue 5692
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# RUN: %fish %s | %filter-ctrlseqs
|
||||
# RUN: %fish %s
|
||||
|
||||
function getenvs
|
||||
env | string match FISH_ENV_TEST_\*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# RUN: %fish %s | %filter-ctrlseqs
|
||||
# RUN: %fish %s
|
||||
# Regression test for issue #4443
|
||||
eval set -l previously_undefined foo
|
||||
echo $previously_undefined
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish -C 'set -l fish %fish' %s | %filter-ctrlseqs
|
||||
#RUN: %fish -C 'set -l fish %fish' %s
|
||||
|
||||
exec cat <nosuchfile
|
||||
#CHECKERR: warning: An error occurred while redirecting file 'nosuchfile'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# RUN: %fish %s | %filter-ctrlseqs
|
||||
# RUN: %fish %s
|
||||
argparse r-require= -- --require 2>/dev/null
|
||||
echo $status
|
||||
# CHECK: 2
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# RUN: %fish -C 'set -g fish %fish' %s | %filter-ctrlseqs
|
||||
# RUN: %fish -C 'set -g fish %fish' %s
|
||||
|
||||
# caret position (#5812)
|
||||
printf '<%s>\n' ($fish -c ' $f[a]' 2>&1)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# RUN: %fish -C "set helper %fish_test_helper" %s | %filter-ctrlseqs
|
||||
# RUN: %fish -C "set helper %fish_test_helper" %s
|
||||
|
||||
# Check that we don't leave stray FDs.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish --features=ampersand-nobg-in-token -C 'set -g fish_indent %fish_indent' %s | %filter-ctrlseqs
|
||||
#RUN: %fish --features=ampersand-nobg-in-token -C 'set -g fish_indent %fish_indent' %s
|
||||
|
||||
echo no&background
|
||||
# CHECK: no&background
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#RUN: %fish --features 'no-stderr-nocaret' -c 'status test-feature stderr-nocaret; echo nocaret: $status' | %filter-ctrlseqs
|
||||
#RUN: %fish --features 'no-stderr-nocaret' -c 'status test-feature stderr-nocaret; echo nocaret: $status'
|
||||
# CHECK: nocaret: 0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#RUN: %fish --features 'stderr-nocaret' -c 'status test-feature stderr-nocaret; echo nocaret: $status' | %filter-ctrlseqs
|
||||
#RUN: %fish --features 'stderr-nocaret' -c 'status test-feature stderr-nocaret; echo nocaret: $status'
|
||||
# CHECK: nocaret: 0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#RUN: %fish --features 'no-stderr-nocaret' -c 'echo -n careton:; echo ^/dev/null' | %filter-ctrlseqs
|
||||
#RUN: %fish --features 'no-stderr-nocaret' -c 'echo -n careton:; echo ^/dev/null'
|
||||
# CHECK: careton:^/dev/null
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#RUN: %fish --features ' stderr-nocaret' -c 'echo -n "caretoff: "; echo ^/dev/null' | %filter-ctrlseqs
|
||||
#RUN: %fish --features ' stderr-nocaret' -c 'echo -n "caretoff: "; echo ^/dev/null'
|
||||
# CHECK: caretoff: ^/dev/null
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish --features=remove-percent-self %s | %filter-ctrlseqs
|
||||
#RUN: %fish --features=remove-percent-self %s
|
||||
|
||||
echo %self
|
||||
# CHECK: %self
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#RUN: %fish --features 'remove-percent-self' -c 'status test-feature remove-percent-self; echo remove-percent-self: $status' | %filter-ctrlseqs
|
||||
#RUN: %fish --features 'remove-percent-self' -c 'status test-feature remove-percent-self; echo remove-percent-self: $status'
|
||||
# CHECK: remove-percent-self: 0
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# Explicitly overriding HOME/XDG_CONFIG_HOME is only required if not invoking via `make test`
|
||||
# RUN: %fish --features '' -c 'string match --quiet "??" ab ; echo "qmarkon: $status"' | %filter-ctrlseqs
|
||||
# RUN: %fish --features '' -c 'string match --quiet "??" ab ; echo "qmarkon: $status"'
|
||||
#CHECK: qmarkon: 1
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#RUN: %fish --features 'qmark-noglob' -C 'string match --quiet "??" ab ; echo "qmarkoff: $status"' | %filter-ctrlseqs
|
||||
#RUN: %fish --features 'qmark-noglob' -C 'string match --quiet "??" ab ; echo "qmarkoff: $status"'
|
||||
# CHECK: qmarkoff: 1
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#RUN: %fish --features 'no-regex-easyesc' -C 'string replace -ra "\\\\" "\\\\\\\\" -- "a\b\c"' | %filter-ctrlseqs
|
||||
#RUN: %fish --features 'no-regex-easyesc' -C 'string replace -ra "\\\\" "\\\\\\\\" -- "a\b\c"'
|
||||
# CHECK: a\b\c
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#RUN: %fish --features 'regex-easyesc' -C 'string replace -ra "\\\\" "\\\\\\\\" -- "a\b\c"' | %filter-ctrlseqs
|
||||
#RUN: %fish --features 'regex-easyesc' -C 'string replace -ra "\\\\" "\\\\\\\\" -- "a\b\c"'
|
||||
# CHECK: a\\b\\c
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# RUN: %fish %s | %filter-ctrlseqs
|
||||
# RUN: %fish %s
|
||||
#
|
||||
# This deals with $PATH manipulation. We need to be careful not to step on anything.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish -C 'set -g fish %fish' %s | %filter-ctrlseqs
|
||||
#RUN: %fish -C 'set -g fish %fish' %s
|
||||
|
||||
# fish_exit fires successfully.
|
||||
echo 'function do_exit --on-event fish_exit; echo "fish_exiting $fish_pid"; end' > /tmp/test_exit.fish
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# RUN: %fish %s | %filter-ctrlseqs
|
||||
# RUN: %fish %s
|
||||
#
|
||||
# This deals with $PATH manipulation. We need to be careful not to step on anything.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# RUN: %fish %s | %filter-ctrlseqs
|
||||
# RUN: %fish %s
|
||||
|
||||
# A for-loop-variable is a local variable in the enclosing scope.
|
||||
set -g i global
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish %s | %filter-ctrlseqs
|
||||
#RUN: %fish %s
|
||||
|
||||
function stuff --argument a b c
|
||||
# This is a comment
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish %s | %filter-ctrlseqs
|
||||
#RUN: %fish %s
|
||||
function t --argument-names a b c
|
||||
echo t
|
||||
end
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish %s | %filter-ctrlseqs
|
||||
#RUN: %fish %s
|
||||
# Test the `functions` builtin
|
||||
|
||||
function f1
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish -i %s | %filter-ctrlseqs
|
||||
#RUN: %fish -i %s | %filter-control-sequences
|
||||
# Note: ^ this is interactive so we test interactive behavior,
|
||||
# e.g. the fish_git_prompt variable handlers test `status is-interactive`.
|
||||
#REQUIRES: command -v git
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# RUN: %fish %s | %filter-ctrlseqs
|
||||
# RUN: %fish %s
|
||||
|
||||
set -l oldpwd $PWD
|
||||
cd (mktemp -d)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish %s | %filter-ctrlseqs
|
||||
#RUN: %fish %s
|
||||
# Verify that specifying unexpected options or arguments results in an error.
|
||||
|
||||
# First using the legacy, now deprecated, long options to specify a
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# RUN: %fish -C 'set -g fish_indent %fish_indent' %s | %filter-ctrlseqs
|
||||
# RUN: %fish -C 'set -g fish_indent %fish_indent' %s
|
||||
# Test file for fish_indent
|
||||
# Note that littlecheck ignores leading whitespace, so we have to use {{ }} to explicitly match it.
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#RUN: %fish -C 'echo init-command' -C 'echo 2nd init-command' | %filter-ctrlseqs
|
||||
#RUN: %fish -C 'echo init-command' -C 'echo 2nd init-command'
|
||||
# CHECK: init-command
|
||||
# CHECK: 2nd init-command
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#RUN: %fish -c 'echo command' -C 'echo init-command' | %filter-ctrlseqs
|
||||
#RUN: %fish -c 'echo command' -C 'echo init-command'
|
||||
# CHECK: init-command
|
||||
# CHECK: command
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#RUN: %fish -C 'echo init-command' -c 'echo command' | %filter-ctrlseqs
|
||||
#RUN: %fish -C 'echo init-command' -c 'echo command'
|
||||
# CHECK: init-command
|
||||
# CHECK: command
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#RUN: %fish -C 'echo init-command' | %filter-ctrlseqs
|
||||
#RUN: %fish -C 'echo init-command'
|
||||
# CHECK: init-command
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish -C 'set -g fish %fish' %s | %filter-ctrlseqs
|
||||
#RUN: %fish -C 'set -g fish %fish' %s
|
||||
# Test that fish doesn't crash if cwd is unreadable at the start (#6597)
|
||||
|
||||
set -l oldpwd $PWD
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish -C 'set -l fish %fish' %s | %filter-ctrlseqs
|
||||
#RUN: %fish -C 'set -l fish %fish' %s | %filter-control-sequences
|
||||
|
||||
$fish -c "echo 1.2.3.4."
|
||||
# CHECK: 1.2.3.4.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: env fth=%fish_test_helper fish=%fish %fish %s | %filter-ctrlseqs
|
||||
#RUN: env fth=%fish_test_helper fish=%fish %fish %s
|
||||
|
||||
# Ensure job control works in non-interactive environments.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: echo 'status job-control full; command echo A ; echo B;' | %fish | %filter-ctrlseqs
|
||||
#RUN: echo 'status job-control full; command echo A ; echo B;' | %fish
|
||||
|
||||
# Regression test for #6573.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# RUN: %fish %s | %filter-ctrlseqs
|
||||
# RUN: %fish %s
|
||||
|
||||
# Ensure that job IDs are sequential.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# RUN: %fish %s | %filter-ctrlseqs
|
||||
# RUN: %fish %s
|
||||
|
||||
# Ensure that jobs are printed with new lines escaped
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish %s | %filter-ctrlseqs
|
||||
#RUN: %fish %s
|
||||
|
||||
# Verify zombies are not left by disown (#7183, #5342)
|
||||
# Do this first to avoid colliding with the other disowned processes below, which may
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish %s | %filter-ctrlseqs
|
||||
#RUN: %fish %s
|
||||
ech\
|
||||
o echo
|
||||
#CHECK: echo
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# RUN: %fish %s | %filter-ctrlseqs
|
||||
# RUN: %fish %s
|
||||
#
|
||||
# These lines left around because we need the line numbers.
|
||||
# This file in general requires careful editing in the middle, I recommend appending.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# RUN: %fish %s | %filter-ctrlseqs
|
||||
# RUN: %fish %s
|
||||
# musl currently does not have a `locale` command, so we skip this test there.
|
||||
# REQUIRES: command -v locale
|
||||
# We need a comma-using locale we know.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish -C "set fish %fish" %s | %filter-ctrlseqs
|
||||
#RUN: %fish -C "set fish %fish" %s
|
||||
# This hangs when running on github actions with tsan for unknown reasons,
|
||||
# see #7934.
|
||||
#REQUIRES: test -z "$GITHUB_WORKFLOW"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish -C 'set -g fish %fish' %s | %filter-ctrlseqs
|
||||
#RUN: %fish -C 'set -g fish %fish' %s
|
||||
|
||||
function never_runs
|
||||
while false
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish %s | %filter-ctrlseqs
|
||||
#RUN: %fish %s
|
||||
# OpenBSD doesn't do hex numbers in str/wcstod (like C99 requires).
|
||||
# So let's skip this.
|
||||
#REQUIRES: test "$(uname)" != OpenBSD
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish --no-config %s | %filter-ctrlseqs
|
||||
#RUN: %fish --no-config %s
|
||||
|
||||
functions | string match help
|
||||
# CHECK: help
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish -C 'set -l fish %fish' %s | %filter-ctrlseqs
|
||||
#RUN: %fish -C 'set -l fish %fish' %s
|
||||
|
||||
# Test that fish -n doesn't check for command existence - function autoloading throws a wrench in that.
|
||||
echo "type foo" | $fish -n
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# RUN: %fish %s | %filter-ctrlseqs
|
||||
# RUN: %fish %s
|
||||
|
||||
# Do not run under sanitizers in CI, as they intercept a busted posix_spawn
|
||||
# which mishandles shebangless scripts.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish %s | %filter-ctrlseqs
|
||||
#RUN: %fish %s
|
||||
|
||||
not true
|
||||
echo $status
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish %s | %filter-ctrlseqs
|
||||
#RUN: %fish %s
|
||||
# NUL-handling
|
||||
|
||||
# This one actually prints a NUL
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish %s | %filter-ctrlseqs
|
||||
#RUN: %fish %s
|
||||
# The "path" builtin for dealing with paths
|
||||
|
||||
# Extension - for figuring out the file extension of a given path.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# RUN: env fth=%fish_test_helper fish=%fish %fish %s | %filter-ctrlseqs
|
||||
# RUN: env fth=%fish_test_helper fish=%fish %fish %s
|
||||
|
||||
status job-control full
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish %s | %filter-ctrlseqs
|
||||
#RUN: %fish %s
|
||||
|
||||
# pipestatus variable - builtins only
|
||||
false | false | false
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# RUN: %fish %s | %filter-ctrlseqs
|
||||
# RUN: %fish %s
|
||||
# Test redirecting builtin help with a pipe
|
||||
|
||||
set -lx __fish_data_dir (mktemp -d)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# RUN: %fish %s | %filter-ctrlseqs
|
||||
# RUN: %fish %s
|
||||
|
||||
printf "%d %d\n" 1 2 3
|
||||
# CHECK: 1 2
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish %s | %filter-ctrlseqs
|
||||
#RUN: %fish %s
|
||||
|
||||
prompt_pwd -d 1 /foo/bar/baz
|
||||
# CHECK: /f/b/baz
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish %s | %filter-ctrlseqs
|
||||
#RUN: %fish %s
|
||||
set -l filename (echo foo | psub --testing)
|
||||
test -f $filename
|
||||
or echo 'psub is not a regular file' >&2
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish %s | %filter-ctrlseqs
|
||||
#RUN: %fish %s
|
||||
set -l max 9223372036854775807
|
||||
set -l close_max 9223372036854775806
|
||||
set -l min -9223372036854775807
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#RUN: %fish -c '%fish -c false; echo RC: $status' | %filter-ctrlseqs
|
||||
#RUN: %fish -c '%fish -c false; echo RC: $status'
|
||||
# CHECK: RC: 1
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# RUN: %fish -C "set fish %fish" %s | %filter-ctrlseqs
|
||||
# RUN: %fish -C "set -g fish %fish; set -g filter_ctrls %filter-control-sequences" %s
|
||||
# Set term again explicitly to ensure behavior.
|
||||
set -gx TERM xterm
|
||||
# Read with no vars is not an error
|
||||
|
@ -248,7 +248,7 @@ if test (string length "$x") -ne $fish_read_limit
|
|||
end
|
||||
|
||||
# Confirm reading non-interactively works -- \#4206 regression
|
||||
echo abc\ndef | $fish -i -c 'read a; read b; set --show a; set --show b'
|
||||
echo abc\ndef | $fish -i -c 'read a; read b; set --show a; set --show b' | $filter_ctrls
|
||||
#CHECK: $a: set in global scope, unexported, with 1 elements
|
||||
#CHECK: $a[1]: |abc|
|
||||
#CHECK: $b: set in global scope, unexported, with 1 elements
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# RUN: %fish %s | %filter-ctrlseqs
|
||||
# RUN: %fish %s
|
||||
# $XDG_DATA_HOME can itself be a relative path. So force it to an absolute
|
||||
# path so we can remove it from any resolved paths below. This is needed
|
||||
# because the contents of the builtin realpath.out file can't include any $PWD
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish %s | %filter-ctrlseqs
|
||||
#RUN: %fish %s
|
||||
|
||||
function outnerr
|
||||
command echo out $argv
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish %s | %filter-ctrlseqs
|
||||
#RUN: %fish %s
|
||||
# Tests for importing named regex groups as fish variables
|
||||
|
||||
# Invalid variable name?
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish -C 'set -l fish %fish' %s | %filter-ctrlseqs
|
||||
#RUN: %fish -C 'set -l fish %fish; set -l filter_ctrls %filter-control-sequences' %s
|
||||
# Some tests of the "return" builtin.
|
||||
|
||||
$fish -c 'return 5'
|
||||
|
@ -15,11 +15,13 @@ $fish -c 'echo foo; return 2; echo bar'
|
|||
echo $status
|
||||
# CHECK: 2
|
||||
|
||||
$fish -ic 'echo interactive-foo; return 69; echo interactive-bar'
|
||||
# CHECK: interactive-foo
|
||||
# but not bar
|
||||
echo $status
|
||||
# CHECK: 69
|
||||
begin
|
||||
$fish -ic 'echo interactive-foo; return 69; echo interactive-bar'
|
||||
# CHECK: interactive-foo
|
||||
# but not bar
|
||||
echo $status
|
||||
# CHECK: 69
|
||||
end | $filter_ctrls
|
||||
|
||||
# Verify negative return values don't cause UB and never map to 0
|
||||
function empty_return
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish %s | %filter-ctrlseqs
|
||||
#RUN: %fish %s
|
||||
# Test scoping rules for functions and status
|
||||
|
||||
set -e smurf
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#RUN: %fish %s | %filter-ctrlseqs
|
||||
#RUN: %fish %s
|
||||
|
||||
# See #6397
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue