Results for parse-errors.test.sh

statusoshosh-cpp
pass 2423
ok 11
FAIL 34
total2828
caseoshosh-cppdescription
0pass pass Long Token - 65535 bytes
1pass pass Token that's too long for Oils - 65536 bytes
2pass pass $% is not a parse error
3pass pass Bad braced var sub -- not allowed
4pass pass Bad var sub caught at parse time
5pass pass Incomplete while
6pass pass Incomplete for
7pass pass Incomplete if
8pass pass do unexpected
9pass pass } is a parse error
10pass pass { is its own word, needs a space
11pass pass } on the second line
12pass pass Invalid for loop variable name
13pass pass bad var name globally isn't parsed like an assignment
14pass pass bad var name in export
15pass pass bad var name in local
16pass pass misplaced parentheses are not a subshell
17pass pass incomplete command sub
18pass pass incomplete backticks
19pass pass misplaced ;;
20pass pass empty clause in [[
21pass FAIL interactive parse error (regression)
details
22FAIL FAIL array literal inside array is a parse error
detailsdetails
23FAIL FAIL array literal inside loop is a parse error
detailsdetails
24FAIL FAIL array literal in case
detailsdetails
25pass pass %foo=() is parse error (regression)
26ok ok leading =word is not allowed regardless of shopt -s parse_equals
detailsdetails
27pass pass echo =word is allowed
47 passed, 2 OK, 0 not implemented, 0 BUG, 3 failed, 0 timeouts, 0 cases skipped
3 failed under osh

Details on runs that didn't PASS

osh-cpp21 interactive parse error (regression)

[osh-cpp status] Expected 2, got 1

stdout:
stderr: 
AddressSanitizer:DEADLYSIGNAL
=================================================================
==18604==ERROR: AddressSanitizer: SEGV on unknown address 0x00000000001c (pc 0x561be2425fd3 bp 0x7ffde6f6e080 sp 0x7ffde6f6e060 T0)
==18604==The signal is caused by a READ memory access.
==18604==Hint: address points to the zero page.
    #0 0x561be2425fd2 in iolib::SignalSafe::PollSigWinch() (/home/uke/oil/_bin/cxx-asan/oils-for-unix+0x13afd2)
    #1 0x561be24d9948 in comp_ui::_IDisplay::_GetTerminalWidth() _gen/bin/oils_for_unix.mycpp.cc:21086
    #2 0x561be24d9896 in comp_ui::_IDisplay::_IDisplay(comp_ui::State*, comp_ui::PromptState*, int, mylib::Writer*, util::_DebugFile*, iolib::SignalSafe*) _gen/bin/oils_for_unix.mycpp.cc:21081
    #3 0x561be24d9f88 in comp_ui::MinimalDisplay::MinimalDisplay(comp_ui::State*, comp_ui::PromptState*, util::_DebugFile*, iolib::SignalSafe*) _gen/bin/oils_for_unix.mycpp.cc:21128
    #4 0x561be27e9b2f in comp_ui::MinimalDisplay* Alloc<comp_ui::MinimalDisplay, comp_ui::State*&, comp_ui::PromptState*&, util::_DebugFile*&, iolib::SignalSafe*&>(comp_ui::State*&, comp_ui::PromptState*&, util::_DebugFile*&, iolib::SignalSafe*&) (/home/uke/oil/_bin/cxx-asan/oils-for-unix+0x4feb2f)
    #5 0x561be26d5b76 in shell::Main(BigStr*, args::Reader*, Dict<BigStr*, BigStr*>*, bool, pyutil::_ResourceLoader*, py_readline::Readline*) _gen/bin/oils_for_unix.mycpp.cc:59043
    #6 0x561be2445899 in oils_for_unix::AppBundleMain(List<BigStr*>*) _gen/bin/oils_for_unix.mycpp.cc:10735
    #7 0x561be2445de5 in oils_for_unix::main(List<BigStr*>*) _gen/bin/oils_for_unix.mycpp.cc:10767
    #8 0x561be26d91d8 in main _gen/bin/oils_for_unix.mycpp.cc:59180
    #9 0x7f1e4c3b909a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)
    #10 0x561be2423fd9 in _start (/home/uke/oil/_bin/cxx-asan/oils-for-unix+0x138fd9)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/home/uke/oil/_bin/cxx-asan/oils-for-unix+0x13afd2) in iolib::SignalSafe::PollSigWinch()
==18604==ABORTING
osh22 array literal inside array is a parse error

[osh status] Expected 2, got 1

stdout:
stderr: 
  a=( inside=() )
             ^
[ stdin ]:1: fatal: Unexpected array literal
osh-cpp22 array literal inside array is a parse error

[osh-cpp status] Expected 2, got 1

stdout:
stderr: 
  a=( inside=() )
             ^
[ stdin ]:1: fatal: Unexpected array literal
osh23 array literal inside loop is a parse error

[osh status] Expected 2, got 1

stdout:
stderr: 
    for x in a=(); do
               ^
[ stdin ]:2: fatal: Unexpected array literal
osh-cpp23 array literal inside loop is a parse error

[osh-cpp status] Expected 2, got 1

stdout:
stderr: 
    for x in a=(); do
               ^
[ stdin ]:2: fatal: Unexpected array literal
osh24 array literal in case

[osh status] Expected 2, got 1

stdout:
stderr: 
    case a=() in
           ^
[ stdin ]:2: fatal: Unexpected array literal
osh-cpp24 array literal in case

[osh-cpp status] Expected 2, got 1

stdout:
stderr: 
    case a=() in
           ^
[ stdin ]:2: fatal: Unexpected array literal
osh26 leading =word is not allowed regardless of shopt -s parse_equals

stdout:
stderr: 
  =word
  ^
[ stdin ]:1: =word isn't allowed.  Hint: add a space after =, or quote it
osh-cpp26 leading =word is not allowed regardless of shopt -s parse_equals

stdout:
stderr: 
  =word
  ^
[ stdin ]:1: =word isn't allowed.  Hint: add a space after =, or quote it