Results for builtin-io.test.sh

statusoshosh-cpp
pass 6363
FAIL 33
total6666
caseoshosh-cppdescription
0pass pass echo dashes
1pass pass echo backslashes
2pass pass echo -e backslashes
3pass pass echo -en
4pass pass echo -ez (invalid flag)
5pass pass echo -e with embedded newline
6pass pass echo -e line continuation
7pass pass echo -e with C escapes
8pass pass echo -e with whitespace C escapes
9pass pass \0
10pass pass \c stops processing input
11pass pass echo -e with hex escape
12pass pass echo -e with octal escape
13pass pass echo -e with 4 digit unicode escape
14pass pass echo -e with 8 digit unicode escape
15pass pass \0377 is the highest octal byte
16pass pass \0400 is one more than the highest octal byte
17pass pass \0777 is out of range
18pass pass incomplete hex escape
19pass pass \x
20pass pass incomplete octal escape
21pass pass incomplete unicode escape
22pass pass \u6
23pass pass \0 \1 \8
24pass pass Read builtin
25pass pass Read from empty file
26pass pass read /dev/null
27pass pass read with zero args
28pass pass Read builtin with no newline.
29pass pass Read builtin with multiple variables
30pass pass Read builtin with not enough variables
31pass pass Read -n (with $REPLY)
32pass pass IFS= read -n (OSH regression: value saved in tempenv)
33pass pass read -n with invalid arg
34pass pass read -n from pipe
35pass pass Read uses $REPLY (without -n)
36pass pass read -r ignores backslashes
37pass pass read -r with other backslash escapes
38pass pass read with line continuation reads multiple physical lines
39pass pass read multiple vars spanning many lines
40pass pass read -r with \n
41pass pass read -s from pipe, not a terminal
42pass pass Read with IFS=$'\n'
43pass pass Read multiple lines with IFS=:
44pass pass Read with IFS=''
45pass pass Read should not respect C escapes.
46pass pass Read builtin uses dynamic scope
47pass pass read -a reads into array
48pass pass read -d : (colon-separated records)
49pass pass read -d '' (null-separated records)
50pass pass read -rd
51pass pass read -d when there's no delimiter
52pass pass read -t 0 tests if input is available
53FAIL FAIL read -t 0.5
detailsdetails
54pass pass read -t -0.5 is invalid
55FAIL FAIL read -u
detailsdetails
56pass pass read -u syntax error
57FAIL FAIL read -N doesn't respect delimiter, while read -n does
detailsdetails
58pass pass read -p (not fully tested)
59pass pass read usage
60pass pass read with smooshed args
61pass pass read -r -d '' for NUL strings, e.g. find -print0
62pass pass redirection from directory is non-fatal error)
63pass pass read -n from directory
64pass pass mapfile from directory (bash doesn't handle errors)
65pass pass Redirect to directory
126 passed, 0 OK, 0 not implemented, 0 BUG, 6 failed, 0 timeouts, 0 cases skipped
3 failed under osh

Details on runs that didn't PASS

osh53 read -t 0.5

[osh stdout] Expected '1\n', got ''
[osh status] Expected 0, got 1

stdout:
stderr: 
  read -t 0.5 < /dev/null
  ^~~~
[ stdin ]:3: fatal: read -t isn't implemented (except t=0)
osh-cpp53 read -t 0.5

[osh-cpp stdout] Expected '1\n', got ''
[osh-cpp status] Expected 0, got 1

stdout:
stderr: 
  read -t 0.5 < /dev/null
  ^~~~
[ stdin ]:3: fatal: read -t isn't implemented (except t=0)
osh55 read -u

[osh stdout] Expected 'reply=hi\n', got 'reply=\n'

stdout:
reply=
stderr:
osh-cpp55 read -u

[osh-cpp stdout] Expected 'reply=hi\n', got 'reply=\n'

stdout:
reply=
stderr:
osh57 read -N doesn't respect delimiter, while read -n does

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

stdout:
fooba
fooba
stderr:
  echo foobar | { read -N 5 -d b; echo $REPLY; }
                       ^~
[ stdin ]:4: 'read' doesn't accept flag -N
osh-cpp57 read -N doesn't respect delimiter, while read -n does

[osh-cpp stdout] Expected 'foo\nfooba\n', got 'fooba\nfooba\n'

stdout:
fooba
fooba
stderr:
  echo foobar | { read -N 5 -d b; echo $REPLY; }
                       ^~
[ stdin ]:4: 'read' doesn't accept flag -N