mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-02 22:21:15 -03:00
Port some small tests to littlecheck
This commit is contained in:
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
|
||||
Reference in New Issue
Block a user