Results for word-split.test.sh

statusoshosh-cpp
pass 4747
FAIL 55
total5252
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 $* with empty IFS
10pass pass Word elision with space
11pass pass Word elision with non-whitespace IFS
12pass pass Leading/trailing word elision with non-whitespace IFS
13pass pass Leading ' ' vs leading ' _ '
14pass pass Multiple non-whitespace IFS chars.
15pass pass IFS with whitespace and non-whitepace.
16pass pass empty $@ and $* is elided
17pass pass unquoted empty arg is elided
18pass pass unquoted whitespace arg is elided
19pass pass empty literals are not elided
20pass pass no splitting when IFS is empty
21pass pass default value can yield multiple words
22pass pass default value can yield multiple words with part joining
23pass pass default value with unquoted IFS char
24pass pass IFS empty doesn't do splitting
25pass pass IFS unset behaves like $' \t\n'
26pass pass IFS='\'
27pass pass IFS='\ '
28pass pass IFS characters are glob metacharacters
29pass pass Trailing space
30pass pass Empty IFS (regression for bug)
31pass pass Unset IFS (regression for bug)
32pass pass IFS=o (regression for bug)
33pass pass IFS and joining arrays
34FAIL FAIL IFS and joining arrays by assignments
detailsdetails
35pass pass TODO
36pass pass IFS='' with $@ and $* (bug #627)
37pass pass IFS='' with $@ and $* and printf (bug #627)
38pass pass IFS='' with ${a[@]} and ${a[*]} (bug #627)
39pass pass IFS='' with ${!prefix@} and ${!prefix*} (bug #627)
40pass pass IFS='' with ${!a[@]} and ${!a[*]} (bug #627)
41FAIL FAIL Bug #628 split on : with : in literal word
detailsdetails
42pass pass Bug #698, similar crash
43pass pass Bug #1664, \\ with noglob
44pass pass Empty IFS bug #2141 (from pnut)
45FAIL FAIL Unicode in IFS
detailsdetails
46pass pass 4 x 3 table: (default IFS, IFS='', IFS=zx) x ( $* "$*" $@ "$@" )
47FAIL FAIL 4 x 3 table - with for loop
detailsdetails
48pass pass IFS=x and '' and $@ - same bug as spec/toysh-posix case #12
49pass pass IFS=x and '' and $@ (#2)
50pass pass IFS=x and '' and $@ (#3)
51FAIL FAIL ""$A"" - empty string on both sides - derived from spec/toysh-posix #15
detailsdetails
94 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

osh34 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:
osh-cpp34 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:
osh41 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['azb']\n['az']\n"

stdout:
['a:b']
['a:']
---
['azb']
['az']
stderr:
osh-cpp41 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['azb']\n['az']\n"

stdout:
['a:b']
['a:']
---
['azb']
['az']
stderr:
osh45 Unicode in IFS

[osh stdout] Expected '<>\n<x>\n', got '<>\n<>\n<x>\n'

stdout:
<>
<>
<x>
stderr:
  setopt SH_WORD_SPLIT
  ^~~~~~
[ stdin ]:1: Command 'setopt' not found (OILS-ERR-100)
osh-cpp45 Unicode in IFS

[osh-cpp stdout] Expected '<>\n<x>\n', got '<>\n<>\n<x>\n'

stdout:
<>
<>
<x>
stderr:
  setopt SH_WORD_SPLIT
  ^~~~~~
[ stdin ]:1: Command 'setopt' not found (OILS-ERR-100)
osh47 4 x 3 table - with for loop

[osh stdout] Expected ' $* -a- -b- -c-\n "$*" -a b c -\n $@ -a- -b- -c-\n "$@" -a b- -c- --\n\n $* -a b- -c-\n "$*" -a bc-\n $@ -a b- -c-\n "$@" -a b- -c- --\n\n $* -a b- -c-\n "$*" -a b c -\n $@ -a b- -c-\n "$@" -a b- -c- --\n' Got ' $* -a- -b- -c-\n "$*" -a b c-\n $@ -a- -b- -c-\n "$@" -a b- -c- --\n\n $* -a b- -c-\n "$*" -a bc-\n $@ -a b- -c-\n "$@" -a b- -c- --\n\n $* -a b- -c-\n "$*" -a b c-\n $@ -a b- -c-\n "$@" -a b- -c- --\n'

stdout:
  $*   -a- -b- -c-
 "$*"  -a b c-
  $@   -a- -b- -c-
 "$@"  -a b- -c- --

  $*   -a b- -c-
 "$*"  -a bc-
  $@   -a b- -c-
 "$@"  -a b- -c- --

  $*   -a b- -c-
 "$*"  -a b c-
  $@   -a b- -c-
 "$@"  -a b- -c- --
stderr:
  setopt SH_WORD_SPLIT  # for zsh
  ^~~~~~
[ stdin ]:3: Command 'setopt' not found (OILS-ERR-100)
osh-cpp47 4 x 3 table - with for loop

[osh-cpp stdout] Expected ' $* -a- -b- -c-\n "$*" -a b c -\n $@ -a- -b- -c-\n "$@" -a b- -c- --\n\n $* -a b- -c-\n "$*" -a bc-\n $@ -a b- -c-\n "$@" -a b- -c- --\n\n $* -a b- -c-\n "$*" -a b c -\n $@ -a b- -c-\n "$@" -a b- -c- --\n' Got ' $* -a- -b- -c-\n "$*" -a b c-\n $@ -a- -b- -c-\n "$@" -a b- -c- --\n\n $* -a b- -c-\n "$*" -a bc-\n $@ -a b- -c-\n "$@" -a b- -c- --\n\n $* -a b- -c-\n "$*" -a b c-\n $@ -a b- -c-\n "$@" -a b- -c- --\n'

stdout:
  $*   -a- -b- -c-
 "$*"  -a b c-
  $@   -a- -b- -c-
 "$@"  -a b- -c- --

  $*   -a b- -c-
 "$*"  -a bc-
  $@   -a b- -c-
 "$@"  -a b- -c- --

  $*   -a b- -c-
 "$*"  -a b c-
  $@   -a b- -c-
 "$@"  -a b- -c- --
stderr:
  setopt SH_WORD_SPLIT  # for zsh
  ^~~~~~
[ stdin ]:3: Command 'setopt' not found (OILS-ERR-100)
osh51 ""$A"" - empty string on both sides - derived from spec/toysh-posix #15

[osh stdout] Expected '=abc=\n=def=\n\n==\n=abc=\n=def=\n==\n\n=abc=\n=def=\n\n==\n=abc=\n=def=\n==\n' Got '=abc=\n=def=\n\n=abc=\n=def=\n\n=abc=\n=def=\n\n=abc=\n=def=\n'

stdout:
=abc=
=def=

=abc=
=def=

=abc=
=def=

=abc=
=def=
stderr:
osh-cpp51 ""$A"" - empty string on both sides - derived from spec/toysh-posix #15

[osh-cpp stdout] Expected '=abc=\n=def=\n\n==\n=abc=\n=def=\n==\n\n=abc=\n=def=\n\n==\n=abc=\n=def=\n==\n' Got '=abc=\n=def=\n\n=abc=\n=def=\n\n=abc=\n=def=\n\n=abc=\n=def=\n'

stdout:
=abc=
=def=

=abc=
=def=

=abc=
=def=

=abc=
=def=
stderr: