Results for ysh-builtins.test.sh

statusosh
pass 26
FAIL 5
total31
caseoshdescription
0pass append onto BashArray a=(1 2)
1pass append onto var a = :| 1 2 |
2pass append onto var a = ['1', '2']
3pass append without typed arg
4pass append passed invalid type
5pass write --sep, --end, -n, varying flag syntax
6pass write --json
7pass write --j8
8pass write -e not supported
9pass write syntax error
10pass write --
11pass read flag usage
12pass read :x :y is allowed
13pass read (&x) is usage error
14FAIL Mixing read --line with read -r
details
15FAIL read --line --with-eol
details
16FAIL read --line --j8
details
17pass echo builtin should disallow typed args - literal
18pass echo builtin should disallow typed args - variable
19FAIL read --all-lines
details
20FAIL read --all-lines --with-eol
details
21pass Can simulate read --all-lines with a proc and value.Place
22pass read --all
23pass read --all from directory is an error (EISDIR)
24pass read -0 is like read -r -d ''
25pass simple_test_builtin
26pass long flags to test
27pass push-registers
28pass push-registers usage
29pass fopen
30pass type(x)
26 passed, 0 OK, 0 not implemented, 0 BUG, 5 failed, 0 timeouts, 0 cases skipped
5 failed under osh

Details on runs that didn't PASS

osh14 Mixing read --line with read -r

[osh stdout] Expected 'TODO\n', got 'read -r\nREPLY=1\nREPLY=2\n\nread --line\n_reply=\n_reply=\n\nMixed\nREPLY=1\nREPLY=2\n_reply=\nREPLY=3\n'

stdout:
read -r
REPLY=1
REPLY=2

read --line
_reply=
_reply=

Mixed
REPLY=1
REPLY=2
_reply=
REPLY=3
stderr:
    read --line
    ^~~~
/home/andy/git/oilshell/oil/spec/testdata/ysh-read-0.sh:14: 'read' no longer supports --line; please use read -r instead (unbuffered I/O)
    read --line
    ^~~~
/home/andy/git/oilshell/oil/spec/testdata/ysh-read-0.sh:17: 'read' no longer supports --line; please use read -r instead (unbuffered I/O)
    read --line
    ^~~~
/home/andy/git/oilshell/oil/spec/testdata/ysh-read-0.sh:30: 'read' no longer supports --line; please use read -r instead (unbuffered I/O)
osh15 read --line --with-eol

[osh stdout] Expected 'reply=1\nreply=2\nreply=3\nmyline=a\nmyline=b\n' Got ''

stdout:
stderr: 
  seq 3 | while read --line {
                ^~~~
/home/andy/git/oilshell/oil/spec/testdata/ysh-read-1.sh:6: 'read' no longer supports --line; please use read -r instead (unbuffered I/O)
  write a b | while read --line --with-eol (&myline) {
                    ^~~~
/home/andy/git/oilshell/oil/spec/testdata/ysh-read-1.sh:9: 'read' no longer supports --line; please use read -r instead (unbuffered I/O)
osh16 read --line --j8

[osh stdout] Expected 'foo\n', got '\n'

stdout:
stderr: 
  echo $'u\'foo\'' | read --line --j8
                     ^~~~
[ stdin ]:1: 'read' no longer supports --line; please use read -r instead (unbuffered I/O)
osh19 read --all-lines

[osh stdout] Expected '1 2 3\n', got '@nums\n'

stdout:
@nums
stderr:
  seq 3 | read --all-lines :nums
               ^~~~~~~~~~~
[ stdin ]:1: 'read' got invalid flag '--all-lines'
osh20 read --all-lines --with-eol

[osh stdout] Expected '1\n2\n3\n', got '@nums\n'

stdout:
@nums
stderr:
  seq 3 | read --all-lines --with-eol :nums
               ^~~~~~~~~~~
[ stdin ]:1: 'read' got invalid flag '--all-lines'