Results for builtin-read.test.sh

statusoshosh-cpp
pass 6262
ok-4 11
FAIL 11
total6464
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
36pass pass read -u
37pass pass read -u syntax error
38pass pass read -u -s
39pass pass read -u 3 -d 5
40pass pass read -u 3 -d b -N 6
41pass pass read -N doesn't respect delimiter, while read -n does
42pass pass read -p (not fully tested)
43pass pass read usage
44pass pass read with smooshed args
45pass pass read -r -d '' for NUL strings, e.g. find -print0
46pass pass read from redirected directory is non-fatal error
47pass pass read -n from directory
48pass pass mapfile from directory (bash doesn't handle errors)
49pass pass read -n 0
50pass pass read -n and backslash escape
51pass pass read -n 4 with incomplete backslash
52pass pass read -n 4 with backslash + delim
53pass pass "backslash + newline" should be swallowed regardless of "-d <delim>"
54pass pass empty input and splitting
55pass pass IFS='x ' read -a: trailing spaces (unlimited split)
56pass pass IFS='x ' read a b: trailing spaces (with max_split)
57pass pass IFS='x ' read -a: intermediate spaces (unlimited split)
58pass pass IFS='x ' incomplete backslash
59pass pass IFS='\ ' and backslash escaping
60pass pass max_split and backslash escaping
61pass pass IFS=x read a b <<< xxxxxx
62pass pass read and "\ "
63ok-4 ok-4 read bash bug
detailsdetails
124 passed, 2 OK, 0 not implemented, 0 BUG, 1 failed, 0 timeouts, 0 cases skipped
1 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)
osh63 read bash bug

stdout:
['', ' ']
stderr:
osh-cpp63 read bash bug

stdout:
['', ' ']
stderr: