ninja: no work to do.

///
/// Runtime errors - Unquoted test functions
///


===== TEST function: unquoted-ambiguous_redirect =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13302 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-ambiguous_redirect_context =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13305 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-array_arith =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13308 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-array_assign_1 =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13311 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-array_assign_2 =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13314 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-bad_file_descriptor =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13317 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-bad_var_ref =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13320 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-bool_status =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13323 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-bool_status_simple =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13326 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-builtin_alias_unalias =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13329 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-builtin_bracket =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13332 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-builtin_builtin =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13335 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-builtin_cd =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13338 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-builtin_exec =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13341 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-builtin_getopts =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13344 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-builtin_help =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13347 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-builtin_popd =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13350 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-builtin_pushd =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13353 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-builtin_source =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13356 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-builtin_trap =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13359 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-builtin_unset =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13362 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-builtin_wait =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13365 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-command_sub_errexit =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13368 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-multiple_assign =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13371 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-multiple_assign_2 =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13374 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-no_such_command_heredoc =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13377 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-nounset =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13380 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-nounset_arith =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13383 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-patsub_bad_glob =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13386 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-pipefail =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13389 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-pipefail_func =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13392 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-pipefail_group =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13395 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-pipefail_multiple =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13398 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-pipefail_no_words =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13401 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-pipefail_subshell =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13404 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-pipefail_while =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13407 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-process_sub_fail =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13410 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-readonly_assign =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13413 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-strict_arith_warnings =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13416 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-strict_array =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13419 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-strict_array_2 =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13422 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-strict_array_3 =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13425 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-strict_array_4 =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13428 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-strict_word_eval_warnings =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13431 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-string_as_array =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13434 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-string_to_hex =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13437 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-string_to_int_arith =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13440 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-string_to_int_bool =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13443 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-string_to_intbase =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13446 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-string_to_octal =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13449 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-undef-assoc-array =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13452 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-undef_arith =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13455 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


===== TEST function: unquoted-undef_arith2 =====

terminate called after throwing an instance of 'IndexError*'
test/runtime-errors.sh: line 20: 13458 Aborted                 (core dumped) $OSH $0 $test_func
----- STATUS: 0


test/runtime-errors.sh: 53 unquoted functions run.  TODO: migrate to test-* to assert status

///
/// Runtime errors - test functions
///

*** Running test-FAIL

===== CASE: -c echo hi > /zzz =====


  echo hi > /zzz
          ^
[ -c flag ]:1: Can't open '/zzz': Permission denied
[ -c flag ]:1: I/O error applying redirect: Permission denied
OK  test-FAIL
*** Running test-arith-ops-str

===== CASE: -c = "100" + "10a" =====


  = "100" + "10a"
          ^
[ -c flag ]:1: fatal: Binary operator expected numbers, got Str and Str (OILS-ERR-201)

===== CASE: -c = "100" - "10a" =====


  = "100" - "10a"
          ^
[ -c flag ]:1: fatal: Binary operator expected numbers, got Str and Str (OILS-ERR-201)

===== CASE: -c = "100" * "10a" =====


  = "100" * "10a"
          ^
[ -c flag ]:1: fatal: Binary operator expected numbers, got Str and Str (OILS-ERR-201)

===== CASE: -c = "100" / "10a" =====


  = "100" / "10a"
          ^
[ -c flag ]:1: fatal: Binary operator expected numbers, got Str and Str (OILS-ERR-201)

===== CASE: -c var a = "100"; setvar a += "10a" =====


  var a = "100"; setvar a += "10a"
                          ^~
[ -c flag ]:1: fatal: Binary operator expected numbers, got Str and Str (OILS-ERR-201)

===== CASE: -c var a = "100"; setvar a -= "10a" =====


  var a = "100"; setvar a -= "10a"
                          ^~
[ -c flag ]:1: fatal: Binary operator expected numbers, got Str and Str (OILS-ERR-201)

===== CASE: -c var a = "100"; setvar a *= "10a" =====


  var a = "100"; setvar a *= "10a"
                          ^~
[ -c flag ]:1: fatal: Binary operator expected numbers, got Str and Str (OILS-ERR-201)

===== CASE: -c var a = "100"; setvar a /= "10a" =====


  var a = "100"; setvar a /= "10a"
                          ^~
[ -c flag ]:1: fatal: Binary operator expected numbers, got Str and Str (OILS-ERR-201)

===== CASE: -c = "age: " + "100" =====


  = "age: " + "100"
            ^
[ -c flag ]:1: fatal: Binary operator expected numbers, got Str and Str (OILS-ERR-201)

===== CASE: -c var myvar = "a string"
= 100 + myvar =====


  = 100 + myvar
        ^
[ -c flag ]:2: fatal: Binary operator expected numbers, got Int and Str (OILS-ERR-201)
OK  test-arith-ops-str
*** Running test-assoc-array

===== CASE: -c declare -A assoc; assoc[x]=1 =====


  declare -A assoc; assoc[x]=1
                    ^~~~~~
[ -c flag ]:1: fatal: Assoc array keys must be strings: $x 'x' "$x" etc. (OILS-ERR-101)

===== CASE: -c declare -A assoc; assoc[$key]=1 =====



===== CASE: -c declare -A assoc; assoc["x"]=1 =====



===== CASE: -c declare -A assoc; assoc['x']=1 =====



===== CASE: -c declare -A assoc; echo ${assoc[x]} =====


  declare -A assoc; echo ${assoc[x]}
                                 ^
[ -c flag ]:1: fatal: Assoc array keys must be strings: $x 'x' "$x" etc. (OILS-ERR-101)

===== CASE: -c declare -A assoc; echo ${assoc["x"]} =====




===== CASE: -c declare -A assoc; echo ${assoc[$key]} =====




===== CASE: -c declare -A assoc; key=k; unset assoc[$key] =====


  assoc[k]
       ^
[ dynamic LHS at line 1 of [ -c flag ] ]:1

  declare -A assoc; key=k; unset assoc[$key]
                                 ^~~~~~
[ -c flag ]:1: fatal: Assoc array keys must be strings: $x 'x' "$x" etc. (OILS-ERR-101)

===== CASE: -c declare -A assoc; key=k; unset "assoc[$key]" =====


  assoc[k]
       ^
[ dynamic LHS at line 1 of [ -c flag ] ]:1

  declare -A assoc; key=k; unset "assoc[$key]"
                                 ^
[ -c flag ]:1: fatal: Assoc array keys must be strings: $x 'x' "$x" etc. (OILS-ERR-101)

===== CASE: -c declare -A assoc; key=k; unset "assoc[$key]" =====


  assoc[k]
       ^
[ dynamic LHS at line 1 of [ -c flag ] ]:1

  declare -A assoc; key=k; unset "assoc[$key]"
                                 ^
[ -c flag ]:1: fatal: Assoc array keys must be strings: $x 'x' "$x" etc. (OILS-ERR-101)

===== CASE: -c declare -A assoc; key=k; unset 'assoc[$key]' =====



===== CASE: -c eval 'declare -A assoc; assoc[x]=1' =====


  declare -A assoc; assoc[x]=1
                    ^~~~~~
[ eval arg at line 1 of [ -c flag ] ]:1

  eval 'declare -A assoc; assoc[x]=1'
  ^~~~
[ -c flag ]:1: fatal: Assoc array keys must be strings: $x 'x' "$x" etc. (OILS-ERR-101)

===== CASE: -c eval 'declare -A assoc; unset "assoc[x]"' =====


  assoc[x]
       ^
[ dynamic LHS at line 1 of [ eval arg at line 1 of [ -c flag ] ] ]:1

  declare -A assoc; unset "assoc[x]"
                          ^
[ eval arg at line 1 of [ -c flag ] ]:1

  eval 'declare -A assoc; unset "assoc[x]"'
  ^~~~
[ -c flag ]:1: fatal: Assoc array keys must be strings: $x 'x' "$x" etc. (OILS-ERR-101)
OK  test-assoc-array
*** Running test-bind

===== CASE: -c bind -x =====


  bind -x
       ^~
[ -c flag ]:1: 'bind' expected argument to '-x'

===== CASE: -c bind -x foo =====


  bind -x foo
  ^~~~
[ -c flag ]:1: warning: bind -x isn't implemented
OK  test-bind
*** Running test-command-not-found

===== CASE: -c findz =====


  findz
  ^~~~~
[ -c flag ]:1: Command 'findz' not found (OILS-ERR-100)
OK  test-command-not-found
*** Running test-control_flow

===== CASE: -c 
break
continue
echo UNREACHABLE
 =====


  break
  ^~~~~
[ -c flag ]:2: warning: Invalid control flow at top level
  continue
  ^~~~~~~~
[ -c flag ]:3: warning: Invalid control flow at top level
UNREACHABLE

===== CASE: -c 
shopt -s strict_control_flow
break
continue
echo UNREACHABLE
 =====


  break
  ^~~~~
[ -c flag ]:3: fatal: Invalid control flow at top level
OK  test-control_flow
*** Running test-control_flow_subshell

===== CASE: -c 
  set -o errexit
  for i in $(seq 2); do
    echo $i
    ( break; echo oops)
  done
   =====


terminate called after throwing an instance of 'IndexError*'
test/sh-assert.sh: line 17: 13558 Aborted                 (core dumped) $sh "$@"

test/runtime-errors.sh: fatal: Should FAIL under _bin/cxx-asan/osh: expected status 1, got 134
FAIL  test-control_flow_subshell