run-file () { local spec_name=$1; shift; local spec_file=spec/$spec_name.test.sh; local suite; suite=$(test/sh_spec.py --print-spec-suite $spec_file); local spec_subdir; case $suite in osh) spec_subdir='osh-cpp' ;; ysh) spec_subdir='ysh-cpp' ;; *) die "Invalid suite $suite" ;; esac; local base_dir=_tmp/spec/$spec_subdir; mkdir -v -p $base_dir; sh-spec $spec_file --timeout 10 --oils-bin-dir $PWD/bin --oils-cpp-bin-dir $REPO_ROOT/_bin/cxx-asan --tsv-output $base_dir/${spec_name}.tsv "$@" } word-split: spec test case results

Results for word-split.test.sh

statusoshosh-cpp
pass 3333
FAIL 88
total4141
caseoshosh-cppdescription
0pass pass IFS is scoped
1pass pass Tilde sub is not split, but var sub is
2pass pass Word splitting
3pass pass Word splitting 2
4pass pass $*
5pass pass "$*"
6pass pass $@
7pass pass "$@"
8pass pass empty argv
9pass pass Word elision with space
10pass pass Word elision with non-whitespace IFS
11pass pass Leading/trailing word elision with non-whitespace IFS
12pass pass Leading ' ' vs leading ' _ '
13pass pass Multiple non-whitespace IFS chars.
14pass pass IFS with whitespace and non-whitepace.
15pass pass empty $@ and $* is elided
16pass pass unquoted empty arg is elided
17pass pass unquoted whitespace arg is elided
18pass pass empty literals are not elided
19pass pass no splitting when IFS is empty
20pass pass default value can yield multiple words
21pass pass default value can yield multiple words with part joining
22pass pass default value with unquoted IFS char
23pass pass IFS empty doesn't do splitting
24pass pass IFS unset behaves like $' \t\n'
25FAIL FAIL IFS='\'
detailsdetails
26FAIL FAIL IFS='\ '
detailsdetails
27pass pass IFS characters are glob metacharacters
28pass pass Trailing space
29pass pass Empty IFS (regression for bug)
30pass pass Unset IFS (regression for bug)
31pass pass IFS=o (regression for bug)
32pass pass IFS and joining arrays
33FAIL FAIL IFS and joining arrays by assignments
detailsdetails
34pass pass TODO
35FAIL FAIL IFS='' with $@ and $* (bug #627)
detailsdetails
36FAIL FAIL IFS='' with $@ and $* and printf (bug #627)
detailsdetails
37FAIL FAIL IFS='' with ${a[@]} and ${a[*]} (bug #627)
detailsdetails
38FAIL FAIL Bug #628 split on : with : in literal word
detailsdetails
39pass pass Bug #698, similar crash
40FAIL FAIL Bug #1664, \\ with noglob
detailsdetails
66 passed, 0 OK, 0 not implemented, 0 BUG, 8 failed, 0 timeouts, 0 cases skipped
8 failed under osh

Details on runs that didn't PASS

osh25 IFS='\'

[osh stdout] Expected "['a', 'b']\n", got "['a', '', '', '', 'b']\n"

stdout:
['a', '', '', '', 'b']
stderr:
osh-cpp25 IFS='\'

[osh-cpp stdout] Expected "['a', 'b']\n", got "['a', '', '', '', 'b']\n"

stdout:
['a', '', '', '', 'b']
stderr:
osh26 IFS='\ '

[osh stdout] Expected "['a', 'b', '', 'c', 'd']\n", got "['a', '', '', '', 'b', '', '', '', '', '', '', '', 'c', 'd', '', '', '']\n"

stdout:
['a', '', '', '', 'b', '', '', '', '', '', '', '', 'c', 'd', '', '', '']
stderr:
osh-cpp26 IFS='\ '

[osh-cpp stdout] Expected "['a', 'b', '', 'c', 'd']\n", got "['a', '', '', '', 'b', '', '', '', '', '', '', '', 'c', 'd', '', '', '']\n"

stdout:
['a', '', '', '', 'b', '', '', '', '', '', '', '', 'c', 'd', '', '', '']
stderr:
osh33 IFS and joining arrays by assignments

[osh stdout] Expected "['x y z']\n['x y z']\n['x y z']\n['x:y z']\n" Got "['x y z']\n['x:y z']\n['x:y z']\n['x:y z']\n"

stdout:
['x y z']
['x:y z']
['x:y z']
['x:y z']
stderr:
  s"$*"
  ^
[ stdin ]:10: 'sx:y z' not found (OILS-ERR-100)
osh-cpp33 IFS and joining arrays by assignments

[osh-cpp stdout] Expected "['x y z']\n['x y z']\n['x y z']\n['x:y z']\n" Got "['x y z']\n['x:y z']\n['x:y z']\n['x:y z']\n"

stdout:
['x y z']
['x:y z']
['x:y z']
['x:y z']
stderr:
  s"$*"
  ^
[ stdin ]:10: 'sx:y z' not found (OILS-ERR-100)
osh35 IFS='' with $@ and $* (bug #627)

[osh stdout] Expected "['at', 'a', 'b c']\n['star', 'a', 'b c']\n" Got "['at', 'ab c']\n['star', 'ab c']\n"

stdout:
['at', 'ab c']
['star', 'ab c']
stderr:
osh-cpp35 IFS='' with $@ and $* (bug #627)

[osh-cpp stdout] Expected "['at', 'a', 'b c']\n['star', 'a', 'b c']\n" Got "['at', 'ab c']\n['star', 'ab c']\n"

stdout:
['at', 'ab c']
['star', 'ab c']
stderr:
osh36 IFS='' with $@ and $* and printf (bug #627)

[osh stdout] Expected '[a]\n[b c]\n[a]\n[b c]\n', got '[ab c]\n[ab c]\n'

stdout:
[ab c]
[ab c]
stderr:
osh-cpp36 IFS='' with $@ and $* and printf (bug #627)

[osh-cpp stdout] Expected '[a]\n[b c]\n[a]\n[b c]\n', got '[ab c]\n[ab c]\n'

stdout:
[ab c]
[ab c]
stderr:
osh37 IFS='' with ${a[@]} and ${a[*]} (bug #627)

[osh stdout] Expected "['at', 'a', 'b c']\n['star', 'a', 'b c']\n" Got "['at', 'ab c']\n['star', 'ab c']\n"

stdout:
['at', 'ab c']
['star', 'ab c']
stderr:
osh-cpp37 IFS='' with ${a[@]} and ${a[*]} (bug #627)

[osh-cpp stdout] Expected "['at', 'a', 'b c']\n['star', 'a', 'b c']\n" Got "['at', 'ab c']\n['star', 'ab c']\n"

stdout:
['at', 'ab c']
['star', 'ab c']
stderr:
osh38 Bug #628 split on : with : in literal word

[osh stdout] Expected "['a', ':b']\n['a', ':']\n---\n['a', 'zb']\n['a', 'z']\n" Got "['a', '\\\\', 'b']\n['a', '\\\\']\n---\n['a', '\\\\', 'b']\n['a', '\\\\']\n"

stdout:
['a', '\\', 'b']
['a', '\\']
---
['a', '\\', 'b']
['a', '\\']
stderr:
osh-cpp38 Bug #628 split on : with : in literal word

[osh-cpp stdout] Expected "['a', ':b']\n['a', ':']\n---\n['a', 'zb']\n['a', 'z']\n" Got "['a', '\\\\', 'b']\n['a', '\\\\']\n---\n['a', '\\\\', 'b']\n['a', '\\\\']\n"

stdout:
['a', '\\', 'b']
['a', '\\']
---
['a', '\\', 'b']
['a', '\\']
stderr:
osh40 Bug #1664, \\ with noglob

[osh stdout] Expected "['[\\\\]_']\n['[\\\\]_']\nnoglob\n['[\\\\]_']\n['[\\\\]_']\n" Got "['[\\\\]_']\n['[\\\\]_']\nnoglob\n['[\\\\\\\\]_']\n['[\\\\]_']\n"

stdout:
['[\\]_']
['[\\]_']
noglob
['[\\\\]_']
['[\\]_']
stderr:
osh-cpp40 Bug #1664, \\ with noglob

[osh-cpp stdout] Expected "['[\\\\]_']\n['[\\\\]_']\nnoglob\n['[\\\\]_']\n['[\\\\]_']\n" Got "['[\\\\]_']\n['[\\\\]_']\nnoglob\n['[\\\\\\\\]_']\n['[\\\\]_']\n"

stdout:
['[\\]_']
['[\\]_']
noglob
['[\\\\]_']
['[\\]_']
stderr: