Results for builtin-read.test.sh

statusoshosh-cpp
pass 4444
FAIL 22
total4646
caseoshosh-cppdescription
0pass pass read line from here doc
1pass pass read from empty file
2pass pass read /dev/null
3pass pass read with zero args
4pass pass read builtin with no newline returns status 1
5pass pass read builtin splits value across multiple vars
6pass pass read builtin with too few variables
7pass pass read -n (with $REPLY)
8pass pass IFS= read -n (OSH regression: value saved in tempenv)
9pass pass read -n doesn't strip whitespace (bug fix)
10pass pass read -d -n - respects delimiter and splits
11pass pass read -n with invalid arg
12pass pass read -n from pipe
13pass pass read without args uses $REPLY, no splitting occurs (without -n)
14pass pass read -n vs. -N
15pass pass read -N ignores delimiters
16pass pass read will unset extranous vars
17pass pass read -r ignores backslashes
18pass pass read -r with other backslash escapes
19pass pass read with line continuation reads multiple physical lines
20pass pass read multiple vars spanning many lines
21pass pass read -r with \n
22pass pass read -s from pipe, not a terminal
23pass pass read with IFS=$'\n'
24pass pass read multiple lines with IFS=:
25pass pass read with IFS=''
26pass pass read does not respect C backslash escapes
27pass pass dynamic scope used to set vars
28pass pass read -a reads into array
29pass pass read -d : (colon-separated records)
30pass pass read -d '' (null-separated records)
31pass pass read -rd
32pass pass read -d when there's no delimiter
33pass pass read -t 0 tests if input is available
34FAIL FAIL read -t 0.5
detailsdetails
35pass pass read -t -0.5 is invalid
36FAIL FAIL read -u
detailsdetails
37pass pass read -u syntax error
38pass pass read -N doesn't respect delimiter, while read -n does
39pass pass read -p (not fully tested)
40pass pass read usage
41pass pass read with smooshed args
42pass pass read -r -d '' for NUL strings, e.g. find -print0
43pass pass read from redirected directory is non-fatal error
44pass pass read -n from directory
45pass pass mapfile from directory (bash doesn't handle errors)
88 passed, 0 OK, 0 not implemented, 0 BUG, 2 failed, 0 timeouts, 0 cases skipped
2 failed under osh

Details on runs that didn't PASS

osh34 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-cpp34 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)
osh36 read -u

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

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

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

stdout:
reply=
stderr: