Results for var-op-slice.test.sh

statusoshosh_.pyosh_.cc
pass 191912
ok 111
FAIL 118
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 pass FAIL Simple ${@:offset}
details
16pass pass FAIL ${@:offset} and ${*:offset}
details
17pass pass FAIL ${@:offset:length} and ${*:offset:length}
details
18pass pass FAIL ${@:0:1}
details
19pass pass FAIL ${array[@]::0}
details
20FAIL FAIL FAIL ${array[@]::}
detailsdetailsdetails
50 passed, 3 OK, 0 not implemented, 0 BUG, 10 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

dumb_alloc:
	gNumNew = 1701
	gNumDelete = 104
	gMemPos = 60016

	gNumMalloc = 41
	gNumFree = 0
	gMemPos2 = 9232
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.opt: cpp/posix.h:74: Tuple2<int, int> posix::pipe(): Assertion `0' failed.\n"
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.opt: cpp/posix.h:74: 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.opt: cpp/posix.h:74: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
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.opt: cpp/posix.h:74: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
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 "['--']\n['-c', '3-']\n['-a', '1', 'b', '2', 'c', '3-']\n['-SHELL', 'a', '1', 'b', '2', 'c', '3-']\n['--']\n['-SHELL', 'a', '1', 'b', '2', 'c', '3-']\n['--']\n['-c', '3-']\n['-a', '1', 'b', '2', 'c', '3-']\n['--']\n['-SHELL a 1 b 2 c 3-']\n['-a 1', 'b 2', 'c 3-']\n['-c 3-']\n['-c 3-']\n['--']\n['--']\n['-a 1 b 2 c 3-']\n['--']\n['-SHELL', 'a 1', 'b 2', 'c 3-']\n['--']\n"
[osh_.cc status] Expected 0, got 255

stdout:
['--']
['-c', '3-']
['-a', '1', 'b', '2', 'c', '3-']
['-SHELL', 'a', '1', 'b', '2', 'c', '3-']
['--']
['-SHELL', 'a', '1', 'b', '2', 'c', '3-']
['--']
['-c', '3-']
['-a', '1', 'b', '2', 'c', '3-']
['--']
['-SHELL a 1 b 2 c 3-']
['-a 1', 'b 2', 'c 3-']
['-c 3-']
['-c 3-']
['--']
['--']
['-a 1 b 2 c 3-']
['--']
['-SHELL', 'a 1', 'b 2', 'c 3-']
['--']
stderr:
dumb_alloc:
	gNumNew = 9131
	gNumDelete = 1363
	gMemPos = 322512

	gNumMalloc = 4015
	gNumFree = 0
	gMemPos2 = 79376
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 "['-SHELL', 'a', '1-']\n['-a', '1', 'b', '2-']\n['-c', '3-']\n['--']\n['--']\n['-c', '3-']\n['-a', '1', 'b', '2-']\n['--']\n['--']\n['-SHELL a 1-']\n['-a 1 b 2-']\n['--']\n['-SHELL', 'a', '1-']\n['-c 3-']\n['-a 1', 'b 2-']\n['-c 3-']\n['--']\n['--']\n['--']\n['-SHELL', 'a 1-']\n"
[osh_.cc status] Expected 0, got 255

stdout:
['-SHELL', 'a', '1-']
['-a', '1', 'b', '2-']
['-c', '3-']
['--']
['--']
['-c', '3-']
['-a', '1', 'b', '2-']
['--']
['--']
['-SHELL a 1-']
['-a 1 b 2-']
['--']
['-SHELL', 'a', '1-']
['-c 3-']
['-a 1', 'b 2-']
['-c 3-']
['--']
['--']
['--']
['-SHELL', 'a 1-']
stderr:
dumb_alloc:
	gNumNew = 9018
	gNumDelete = 1305
	gMemPos = 317408

	gNumMalloc = 3950
	gNumFree = 0
	gMemPos2 = 78208
osh_.cc18 ${@:0:1}

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

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

[osh_.cc status] Expected 0, got 255

stdout:
[]
stderr:
dumb_alloc:
	gNumNew = 1879
	gNumDelete = 133
	gMemPos = 64816

	gNumMalloc = 91
	gNumFree = 0
	gMemPos2 = 10032
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

dumb_alloc:
	gNumNew = 1804
	gNumDelete = 117
	gMemPos = 62784

	gNumMalloc = 83
	gNumFree = 0
	gMemPos2 = 9936