Move the invocation checks to invocation.fish

These where separate files so we could use the %s substitution to run
that fish, but since discovering setting $fish that
workaround isn't necessary.
This commit is contained in:
Fabian Homborg 2020-03-31 19:52:56 +02:00
parent d54609bd63
commit a29bc127ce
5 changed files with 28 additions and 26 deletions

View file

@ -1,10 +0,0 @@
# RUN: %fish -C 'set -l fish %fish' %s
if not set -q GITHUB_WORKFLOW
$fish -c 'if status --is-login ; echo login shell ; else ; echo not login shell ; end; if status --is-interactive ; echo interactive ; else ; echo not interactive ; end' -i
else
# FAKE
echo not login shell
echo interactive
end
# CHECK: not login shell
# CHECK: interactive

View file

@ -10,3 +10,31 @@ echo $status
PATH= $fish -c "echo (command a)" 2>/dev/null
echo $status
# CHECK: 127
if not set -q GITHUB_WORKFLOW
$fish -c 'if status --is-login ; echo login shell ; else ; echo not login shell ; end; if status --is-interactive ; echo interactive ; else ; echo not interactive ; end' -i
# CHECK: not login shell
# CHECK: interactive
$fish -c 'if status --is-login ; echo login shell ; else ; echo not login shell ; end; if status --is-interactive ; echo interactive ; else ; echo not interactive ; end' -l -i
# CHECK: login shell
# CHECK: interactive
else
# Github Action doesn't start this in a terminal, so fish would complain.
# Instead, we just fake the result, since we have no way to indicate a skipped test.
echo not login shell
echo interactive
echo login shell
echo interactive
end
$fish -c 'if status --is-login ; echo login shell ; else ; echo not login shell ; end; if status --is-interactive ; echo interactive ; else ; echo not interactive ; end' -l
# CHECK: login shell
# CHECK: not interactive
$fish -c 'if status --is-login ; echo login shell ; else ; echo not login shell ; end; if status --is-interactive ; echo interactive ; else ; echo not interactive ; end'
# CHECK: not login shell
# CHECK: not interactive
$fish -c 'if status --is-login ; echo login shell ; else ; echo not login shell ; end; if status --is-interactive ; echo interactive ; else ; echo not interactive ; end' -l
# CHECK: login shell
# CHECK: not interactive

View file

@ -1,9 +0,0 @@
# RUN: %fish -C 'set -l fish %fish' %s
if not set -q GITHUB_WORKFLOW
$fish -c 'if status --is-login ; echo login shell ; else ; echo not login shell ; end; if status --is-interactive ; echo interactive ; else ; echo not interactive ; end' -l -i
else
echo login shell
echo interactive
end
# CHECK: login shell
# CHECK: interactive

View file

@ -1,3 +0,0 @@
#RUN: %fish -c 'if status --is-login ; echo login shell ; else ; echo not login shell ; end; if status --is-interactive ; echo interactive ; else ; echo not interactive ; end' -l
# CHECK: login shell
# CHECK: not interactive

View file

@ -1,4 +0,0 @@
#RUN: %fish -c 'if status --is-login ; echo login shell ; else ; echo not login shell ; end; if status --is-interactive ; echo interactive ; else ; echo not interactive ; end'
# CHECK: not login shell
# CHECK: not interactive