spec test index / oilshell.org
| status | osh | osh_ALT | |
| pass | 7 | 7 | |
| FAIL | 4 | 4 | |
| total | 11 | 11 | |
| case | osh | osh_ALT | description | 
| 0 | FAIL | FAIL | precedence of 1:3 vs comparison | 
| details | details | ||
| 1 | FAIL | FAIL | precedence of 1:3 vs bitwise operator | 
| details | details | ||
| 2 | pass | pass | subscript and slice :| 1 2 3 4 | | 
| 3 | FAIL | FAIL | slice subscripts are adjusted like Python | 
| details | details | ||
| 4 | pass | pass | subscript and slice of List | 
| 5 | pass | pass | expressions and negative indices | 
| 6 | pass | pass | Index with expression | 
| 7 | pass | pass | Copy with a[:] | 
| 8 | pass | pass | Iterate over range | 
| 9 | pass | pass | Loops over bogus ranges terminate | 
| 10 | FAIL | FAIL | Slices with Multiple Dimensions (for TSV8?) | 
| details | details | 
14 passed, 0 OK, 0 not implemented, 0 BUG, 4 failed, 0 timeouts, 0 cases skipped 4 failed under osh
| osh | 0 precedence of 1:3 vs comparison [osh stdout] Expected '(Range) 1 .. 3\n', got '(Range 1 .. 3)\n' stdout: (Range 1 .. 3)stderr:  | 
| osh_ALT | 0 precedence of 1:3 vs comparison [osh_ALT stdout] Expected '(Range) 1 .. 3\n', got '(Range 1 .. 3)\n' stdout: (Range 1 .. 3)stderr:  | 
| osh | 1 precedence of 1:3 vs bitwise operator [osh stdout] Expected '(Range) 3 .. 7\n', got '(Range 3 .. 7)\n' stdout: (Range 3 .. 7)stderr:  | 
| osh_ALT | 1 precedence of 1:3 vs bitwise operator [osh_ALT stdout] Expected '(Range) 3 .. 7\n', got '(Range 3 .. 7)\n' stdout: (Range 3 .. 7)stderr:  | 
| osh | 3 slice subscripts are adjusted like Python [osh stdout] Expected '[2,3]\n[2,3]\n\n[2,3,4,5]\n[2,3,4,5]\n\n[]\n[]\n\n[2,3,4]\n[2,3,4]\n\n[3,4]\n[3,4]\n\n[1,2,3,4]\n[1,2,3,4]\n\n[]\n[]\n\n[5]\n[5]\n\n' Got '[2,3]\n\n[2,3,4,5]\n\n[]\n\n[2,3,4]\n\n[3,4]\n\n[1,2,3,4]\n\n[]\n\n[5]\n\n' stdout: [2,3] [2,3,4,5] [] [2,3,4] [3,4] [1,2,3,4] [] [5]stderr:     python3 -c '
    ^~~~~~~
[ stdin ]:2: 'python3' not found (OILS-ERR-100)
    python3 -c '
    ^~~~~~~
[ stdin ]:2: 'python3' not found (OILS-ERR-100)
    python3 -c '
    ^~~~~~~
[ stdin ]:2: 'python3' not found (OILS-ERR-100)
    python3 -c '
    ^~~~~~~
[ stdin ]:2: 'python3' not found (OILS-ERR-100)
    python3 -c '
    ^~~~~~~
[ stdin ]:2: 'python3' not found (OILS-ERR-100)
    python3 -c '
    ^~~~~~~
[ stdin ]:2: 'python3' not found (OILS-ERR-100)
    python3 -c '
    ^~~~~~~
[ stdin ]:2: 'python3' not found (OILS-ERR-100)
    python3 -c '
    ^~~~~~~
[ stdin ]:2: 'python3' not found (OILS-ERR-100)
 | 
| osh_ALT | 3 slice subscripts are adjusted like Python [osh_ALT stdout] Expected '[2,3]\n[2,3]\n\n[2,3,4,5]\n[2,3,4,5]\n\n[]\n[]\n\n[2,3,4]\n[2,3,4]\n\n[3,4]\n[3,4]\n\n[1,2,3,4]\n[1,2,3,4]\n\n[]\n[]\n\n[5]\n[5]\n\n' Got '[2,3]\n\n[2,3,4,5]\n\n[]\n\n[2,3,4]\n\n[3,4]\n\n[1,2,3,4]\n\n[]\n\n[5]\n\n' stdout: [2,3] [2,3,4,5] [] [2,3,4] [3,4] [1,2,3,4] [] [5]stderr:     python3 -c '
    ^~~~~~~
[ stdin ]:2: 'python3' not found (OILS-ERR-100)
    python3 -c '
    ^~~~~~~
[ stdin ]:2: 'python3' not found (OILS-ERR-100)
    python3 -c '
    ^~~~~~~
[ stdin ]:2: 'python3' not found (OILS-ERR-100)
    python3 -c '
    ^~~~~~~
[ stdin ]:2: 'python3' not found (OILS-ERR-100)
    python3 -c '
    ^~~~~~~
[ stdin ]:2: 'python3' not found (OILS-ERR-100)
    python3 -c '
    ^~~~~~~
[ stdin ]:2: 'python3' not found (OILS-ERR-100)
    python3 -c '
    ^~~~~~~
[ stdin ]:2: 'python3' not found (OILS-ERR-100)
    python3 -c '
    ^~~~~~~
[ stdin ]:2: 'python3' not found (OILS-ERR-100)
 | 
| osh | 10 Slices with Multiple Dimensions (for TSV8?) [osh stdout] Expected "(Str) 'TODO: Table Slicing'\n(Str) 'TODO: Table Slicing'\n" Got '' [osh status] Expected 0, got 2 stdout: stderr:   qtt pretty :mytable <<< '''
  ^~~
[ stdin ]:1: 'qtt' not found (OILS-ERR-100)
  var t1 = mytable[2:, :]
                     ^
[ stdin ]:8: Only 1 subscript is accepted
 | 
| osh_ALT | 10 Slices with Multiple Dimensions (for TSV8?) [osh_ALT stdout] Expected "(Str) 'TODO: Table Slicing'\n(Str) 'TODO: Table Slicing'\n" Got '' [osh_ALT status] Expected 0, got 2 stdout: stderr:   qtt pretty :mytable <<< '''
  ^~~
[ stdin ]:1: 'qtt' not found (OILS-ERR-100)
  var t1 = mytable[2:, :]
                     ^
[ stdin ]:8: Only 1 subscript is accepted
 |