mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-01-19 19:22:45 +08:00
Port some small tests to littlecheck
This commit is contained in:
parent
8bd97d087d
commit
bf7629462a
13
tests/checks/exec.fish
Normal file
13
tests/checks/exec.fish
Normal file
|
@ -0,0 +1,13 @@
|
|||
#RUN: %fish %s
|
||||
exec cat < nosuchfile
|
||||
#CHECKERR: warning: An error occurred while redirecting file 'nosuchfile'
|
||||
#CHECKERR: open: No such file or directory
|
||||
echo "failed: $status"
|
||||
#CHECK: failed: 1
|
||||
not exec cat < nosuchfile
|
||||
#CHECKERR: warning: An error occurred while redirecting file 'nosuchfile'
|
||||
#CHECKERR: open: No such file or directory
|
||||
echo "neg failed: $status"
|
||||
#CHECK: neg failed: 0
|
||||
exec cat < /dev/null
|
||||
echo "not reached"
|
|
@ -11,3 +11,9 @@ printf '<%s>\n' ($fish -c 'if $f[a]; end' 2>&1)
|
|||
# CHECK: <fish: Invalid index value>
|
||||
# CHECK: <if $f[a]; end>
|
||||
# CHECK: < ^>
|
||||
|
||||
set a A
|
||||
set aa AA
|
||||
set aaa AAA
|
||||
echo {$aa}a{1,2,3}(for a in 1 2 3; echo $a; end)
|
||||
#CHECK: AAa11 AAa21 AAa31 AAa12 AAa22 AAa32 AAa13 AAa23 AAa33
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
#Tests complex parameter expansions
|
||||
|
||||
set a A
|
||||
set aa AA
|
||||
set aaa AAA
|
||||
echo {$aa}a{1,2,3}(for a in 1 2 3; echo $a; end)
|
|
@ -1 +0,0 @@
|
|||
AAa11 AAa21 AAa31 AAa12 AAa22 AAa32 AAa13 AAa23 AAa33
|
|
@ -1,4 +0,0 @@
|
|||
warning: An error occurred while redirecting file 'nosuchfile'
|
||||
open: No such file or directory
|
||||
warning: An error occurred while redirecting file 'nosuchfile'
|
||||
open: No such file or directory
|
|
@ -1,6 +0,0 @@
|
|||
exec cat < nosuchfile
|
||||
echo "failed: $status"
|
||||
not exec cat < nosuchfile
|
||||
echo "neg failed: $status"
|
||||
exec cat < /dev/null
|
||||
echo "not reached"
|
|
@ -1,2 +0,0 @@
|
|||
failed: 1
|
||||
neg failed: 0
|
|
@ -1 +0,0 @@
|
|||
0
|
Loading…
Reference in New Issue
Block a user