diff --git a/tests/checks/interactive.fish b/tests/checks/interactive.fish deleted file mode 100644 index f0822ee38..000000000 --- a/tests/checks/interactive.fish +++ /dev/null @@ -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 diff --git a/tests/checks/invocation.fish b/tests/checks/invocation.fish index f10809118..b2b843293 100644 --- a/tests/checks/invocation.fish +++ b/tests/checks/invocation.fish @@ -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 diff --git a/tests/checks/login-interactive.fish b/tests/checks/login-interactive.fish deleted file mode 100644 index ef7142398..000000000 --- a/tests/checks/login-interactive.fish +++ /dev/null @@ -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 diff --git a/tests/checks/login.fish b/tests/checks/login.fish deleted file mode 100644 index b9965d866..000000000 --- a/tests/checks/login.fish +++ /dev/null @@ -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 diff --git a/tests/checks/no-login-no-interactive.fish b/tests/checks/no-login-no-interactive.fish deleted file mode 100644 index dd369e599..000000000 --- a/tests/checks/no-login-no-interactive.fish +++ /dev/null @@ -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