===== CASE: FOO=1 break ===== FOO=1 break ^~~~ [ -c flag ]:1: Control flow shouldn't have environment bindings ===== CASE: break 1 2 ===== break 1 2 ^ [ -c flag ]:1: Unexpected argument to 'break' ===== CASE: break >out ===== break >out ^~~~~ [ -c flag ]:1: Control flow shouldn't have redirects ===== CASE: for x in & ===== for x in & ^ [ -c flag ]:1: Invalid word in for loop ===== CASE: for (( i=0; i<10; i++ )) ls ===== for (( i=0; i<10; i++ )) ls ^~ [ -c flag ]:1: Invalid word after for expression ===== CASE: for $x in 1 2 3; do echo $i; done ===== for $x in 1 2 3; do echo $i; done ^~ [ -c flag ]:1: Loop variable name should be a constant ===== CASE: for x.y in 1 2 3; do echo $i; done ===== for x.y in 1 2 3; do echo $i; done ^~~ [ -c flag ]:1: Invalid loop variable name ===== CASE: for x in 1 2 3; & ===== for x in 1 2 3; & ^ [ -c flag ]:1: Expected word type , got ===== CASE: for foo BAD ===== for foo BAD ^~~ [ -c flag ]:1: Unexpected word after for loop variable ===== CASE: x"y"() { echo hi; } ===== x"y"() { echo hi; } ^ [ -c flag ]:1: Invalid function name ===== CASE: function x"y" { echo hi; } ===== function x"y" { echo hi; } ^ [ -c flag ]:1: Invalid KSH-style function name ===== CASE: } ===== } ^ [ -c flag ]:1: Unexpected right brace ===== CASE: case foo in *) echo ===== case foo in *) echo ^ [ -c flag ]:1: Expected ;; or esac ===== CASE: ls foo| ===== ls foo| ^ [ -c flag ]:1: Unexpected EOF while parsing command ===== CASE: ls foo&& ===== ls foo&& ^ [ -c flag ]:1: Unexpected EOF while parsing command ===== CASE: foo() ===== foo() ^ [ -c flag ]:1: Unexpected word while parsing compound command ===== CASE: [ ( x ] ===== [ ( x ] ^ [ -c flag ]:1: Expected ) in function definition ===== CASE: PYTHONPATH=. FOO=(1 2) python ===== PYTHONPATH=. FOO=(1 2) python ^~~~ [ -c flag ]:1: Environment bindings can't contain array literals ===== CASE: PYTHONPATH+=1 python ===== PYTHONPATH+=1 python ^~~~~~~~~~~~ [ -c flag ]:1: Expected = in environment binding, got += ===== CASE: echo line 2 echo $( echo ===== line 2 echo $( echo ^ [ -c flag ]:3: Unexpected EOF while parsing command ===== CASE: echo line 2 echo ` echo ===== line 2 echo ` echo ^ [ -c flag ]:3: Unexpected EOF while looking for closing backtick ===== CASE: echo line 2 echo ` echo \` ===== line 2 echo ` echo \` ^ [ -c flag ]:3: Unexpected EOF while looking for closing backtick ===== CASE: echo line 2 echo ` echo \`unclosed ` ===== line 2 echo `unclosed ^ [ backticks at ... ]:1: Unexpected EOF while looking for closing backtick ===== CASE: echo < << ===== echo < << ^~ [ -c flag ]:1: Invalid token after redirect operator ===== CASE: echo $( echo > >> ) ===== echo $( echo > >> ) ^~ [ -c flag ]:1: Invalid token after redirect operator ===== CASE: cat <out { echo hi } ===== >out { echo hi } ^ [ -c flag ]:1: Unexpected block ===== CASE: a=1 b=2 { echo hi } ===== a=1 b=2 { echo hi } ^~ [ -c flag ]:1: name=val isn't allowed when shopt 'parse_equals' is on. Hint: add 'env' before it, or spaces around = ===== CASE: break { echo hi } ===== break { echo hi } ^ [ -c flag ]:1: Unexpected block ===== CASE: cd / { echo hi } cd / ===== cd / { echo hi } cd / ^~ [ -c flag ]:1: Unexpected word while parsing command line ===== CASE: if test -f foo{ echo hi } ===== if test -f foo{ echo hi } ^~~ [ -c flag ]:1: Word has unbalanced { }. Maybe add a space or quote it like \{ ===== CASE: var x = /[a-zA-Z]/ ===== var x = /[a-zA-Z]/ ^ [ -c flag ]:1: Syntax error in expression ===== CASE: var x = /[a-z0-9]/ ===== var x = /[a-z0-9]/ ^ [ -c flag ]:1: Syntax error in expression ===== CASE: var x = /[a-zz]/ ===== var x = /[a-zz]/ ^~ [ -c flag ]:1: Range start/end shouldn't have more than one character ===== CASE: var x = /['ab'-'z']/ ===== var x = /['ab'-'z']/ ^ [ -c flag ]:1: Range start/end shouldn't have more than one character ===== CASE: var x = /[$a-${z}]/ ===== var x = /[$a-${z}]/ ^ [ -c flag ]:1: Syntax error in expression ===== CASE: var x = /[abc]/ ===== var x = /[abc]/ ^~~ [ -c flag ]:1: 'abc' isn't a character class ===== CASE: var x = /[a b c]/ ===== var x = /[a b c]/ ^ [ -c flag ]:1: 'a' isn't a character class ===== CASE: proc f[] { echo hi } ===== proc f[] { echo hi } ^~ [ -c flag ]:1: Invalid proc name 'f[' ===== CASE: proc : { echo hi } ===== proc : { echo hi } ^ [ -c flag ]:1: Invalid proc name ':' ===== CASE: proc foo::bar { echo hi } ===== proc foo::bar { echo hi } ^~ [ -c flag ]:1: Syntax error in expression ===== CASE: pp 5 % 3 ===== pp 5 % 3 ^ [ -c flag ]:1: Unexpected token in expression mode ===== CASE: pp >>= ===== pp >>= ^~~ [ -c flag ]:1: Syntax error in expression ===== CASE: pp %( ===== pp %( ^~ [ -c flag ]:1: Unexpected token in expression mode (Expr_Reserved) ---------------------- ===== CASE: test/parse-errors/01-bad-func.sh ===== foo (ls) ^~ test/parse-errors/01-bad-func.sh:14: Expected ) in function definition ===== CASE: test/parse-errors/02-bad-func.sh ===== foo() ^ test/parse-errors/02-bad-func.sh:3: Unexpected word while parsing compound command ===== CASE: test/parse-errors/05-unterminated-single.sh ===== A B echo 'C ^ test/parse-errors/05-unterminated-single.sh:5: Unexpected EOF in single-quoted string that began here ===== CASE: test/parse-errors/06-unterminated-double-long.sh ===== A B echo 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 " ^ test/parse-errors/06-unterminated-double-long.sh:9: Unexpected EOF reading double-quoted string that began here ===== CASE: test/parse-errors/06-unterminated-double.sh ===== A B echo "0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 ^ test/parse-errors/06-unterminated-double.sh:6: Unexpected EOF reading double-quoted string that began here ===== CASE: test/parse-errors/07-unterminated-here-doc-2.sh ===== func() { ^ test/parse-errors/07-unterminated-here-doc-2.sh:1: Syntax error in expression ===== CASE: test/parse-errors/07-unterminated-here-doc.sh ===== cat <