Results for var-op-slice.test.sh

statusoshosh_.pyosh_.cc
pass 191512
ok 111
FAIL 158
total212121
caseoshosh_.pyosh_.ccdescription
0pass pass pass String slice
1ok ok ok Cannot take length of substring slice
detailsdetailsdetails
2pass pass pass Out of range string slice: begin
3pass pass pass Out of range string slice: length
4pass pass pass Negative start index
5pass pass pass Negative start index respects unicode
6pass pass pass Negative second arg is position, not length!
7pass pass pass Negative start index respects unicode
8pass pass pass String slice with math
9pass pass pass Slice undefined
10pass pass pass Slice UTF-8 String
11pass pass FAIL Slice string with invalid UTF-8 results in empty string and warning
details
12pass pass FAIL Slice string with invalid UTF-8 with strict_word_eval
details
13pass pass pass Slice with an index that's an array itself not allowed
14pass pass pass Slice with an assoc array
15pass FAIL FAIL Simple ${@:offset}
detailsdetails
16pass FAIL FAIL ${@:offset} and ${*:offset}
detailsdetails
17pass FAIL FAIL ${@:offset:length} and ${*:offset:length}
detailsdetails
18pass pass FAIL ${@:0:1}
details
19pass FAIL FAIL ${array[@]::0}
detailsdetails
20FAIL FAIL FAIL ${array[@]::}
detailsdetailsdetails
46 passed, 3 OK, 0 not implemented, 0 BUG, 14 failed, 0 timeouts, 0 cases skipped
1 failed under osh

Details on runs that didn't PASS

osh1 Cannot take length of substring slice

stdout:
stderr: 
  echo ${#v:1:3}
           ^
[ stdin ]:2: Expected } after length expression
osh_.py1 Cannot take length of substring slice

stdout:
stderr: 
  echo ${#v:1:3}
           ^
[ stdin ]:2: Expected } after length expression
osh_.cc1 Cannot take length of substring slice

stdout:
stderr: 
  echo ${#v:1:3}
           ^
[ stdin ]:2: Expected } after length expression
osh_.cc11 Slice string with invalid UTF-8 results in empty string and warning

[osh_.cc stdout] Expected '--\n', got ''
[osh_.cc stderr] Expected '[??? no location ???] warning: Invalid start of UTF-8 character\n', got "osh_eval.dbg: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed.\n"
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.dbg: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh_.cc12 Slice string with invalid UTF-8 with strict_word_eval

[osh_.cc stdout] Expected 'slice\n', got ''
[osh_.cc status] Expected 1, got -6

stdout:
stderr: 
osh_eval.dbg: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh_.py15 Simple ${@:offset}

[osh_.py stdout] Expected "['SHELL', '4', '5', '6']\n['4', '5', '6']\n['5', '6']\n", got '\n'
[osh_.py status] Expected 0, got 127

stdout:
stderr: 
  result=$(argv.py ${@:0})
           ^~~~~~~
[ stdin ]:2: 'argv.py' not found
  argv.py ${@:1}
  ^~~~~~~
[ stdin ]:4: 'argv.py' not found
  argv.py ${@:2}
  ^~~~~~~
[ stdin ]:5: 'argv.py' not found
osh_.cc15 Simple ${@:offset}

[osh_.cc stdout] Expected "['SHELL', '4', '5', '6']\n['4', '5', '6']\n['5', '6']\n", got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.dbg: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh_.py16 ${@:offset} and ${*:offset}

[osh_.py stdout] Expected "['-SHELL', 'a', '1', 'b', '2', 'c', '3-']\n['-a', '1', 'b', '2', 'c', '3-']\n['-c', '3-']\n['--']\n['--']\n['-SHELL', 'a', '1', 'b', '2', 'c', '3-']\n['-a', '1', 'b', '2', 'c', '3-']\n['-c', '3-']\n['--']\n['--']\n['-SHELL a 1 b 2 c 3-']\n['-a 1 b 2 c 3-']\n['-c 3-']\n['--']\n['--']\n['-SHELL', 'a 1', 'b 2', 'c 3-']\n['-a 1', 'b 2', 'c 3-']\n['-c 3-']\n['--']\n['--']\n", got ''
[osh_.py status] Expected 0, got 127

stdout:
stderr: 
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
osh_.cc16 ${@:offset} and ${*:offset}

[osh_.cc stdout] Expected "['-SHELL', 'a', '1', 'b', '2', 'c', '3-']\n['-a', '1', 'b', '2', 'c', '3-']\n['-c', '3-']\n['--']\n['--']\n['-SHELL', 'a', '1', 'b', '2', 'c', '3-']\n['-a', '1', 'b', '2', 'c', '3-']\n['-c', '3-']\n['--']\n['--']\n['-SHELL a 1 b 2 c 3-']\n['-a 1 b 2 c 3-']\n['-c 3-']\n['--']\n['--']\n['-SHELL', 'a 1', 'b 2', 'c 3-']\n['-a 1', 'b 2', 'c 3-']\n['-c 3-']\n['--']\n['--']\n", got ''
[osh_.cc status] Expected 0, got 127

stdout:
stderr: 
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
osh_.py17 ${@:offset:length} and ${*:offset:length}

[osh_.py stdout] Expected "['-SHELL', 'a', '1-']\n['-a', '1', 'b', '2-']\n['-c', '3-']\n['--']\n['--']\n['-SHELL', 'a', '1-']\n['-a', '1', 'b', '2-']\n['-c', '3-']\n['--']\n['--']\n['-SHELL a 1-']\n['-a 1 b 2-']\n['-c 3-']\n['--']\n['--']\n['-SHELL', 'a 1-']\n['-a 1', 'b 2-']\n['-c 3-']\n['--']\n['--']\n", got ''
[osh_.py status] Expected 0, got 127

stdout:
stderr: 
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
osh_.cc17 ${@:offset:length} and ${*:offset:length}

[osh_.cc stdout] Expected "['-SHELL', 'a', '1-']\n['-a', '1', 'b', '2-']\n['-c', '3-']\n['--']\n['--']\n['-SHELL', 'a', '1-']\n['-a', '1', 'b', '2-']\n['-c', '3-']\n['--']\n['--']\n['-SHELL a 1-']\n['-a 1 b 2-']\n['-c 3-']\n['--']\n['--']\n['-SHELL', 'a 1-']\n['-a 1', 'b 2-']\n['-c 3-']\n['--']\n['--']\n", got ''
[osh_.cc status] Expected 0, got 127

stdout:
stderr: 
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
    argv.py "${@//$0/SHELL}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
osh_.cc18 ${@:0:1}

[osh_.cc stdout] Expected 'SHELL\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.dbg: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh_.py19 ${array[@]::0}

[osh_.py stdout] Expected '[]\n', got ''
[osh_.py status] Expected 0, got 127

stdout:
stderr: 
  argv.py ${array[@]::0}
  ^~~~~~~
[ stdin ]:2: 'argv.py' not found
osh_.cc19 ${array[@]::0}

[osh_.cc stdout] Expected '[]\n', got ''
[osh_.cc status] Expected 0, got 127

stdout:
stderr: 
  argv.py ${array[@]::0}
  ^~~~~~~
[ stdin ]:2: 'argv.py' not found
osh20 ${array[@]::}

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

stdout:
stderr: 
  argv.py ${array[@]::}
                      ^
[ stdin ]:2: Token can't be used in prefix position
osh_.py20 ${array[@]::}

[osh_.py stdout] Expected '[]\n', got ''
[osh_.py status] Expected 0, got 2

stdout:
stderr: 
  argv.py ${array[@]::}
                      ^
[ stdin ]:2: Token can't be used in prefix position
osh_.cc20 ${array[@]::}

[osh_.cc stdout] Expected '[]\n', got ''
[osh_.cc status] Expected 0, got 2

stdout:
stderr: 
  argv.py ${array[@]::}
                      ^
[ stdin ]:2: Token can't be used in prefix position