Skip to content

Commit

Permalink
[test/parse-errors] Change the spec after relaxing the check.
Browse files Browse the repository at this point in the history
We might be able to tighten it up again, but I don't think it's worth it
right now.
  • Loading branch information
Andy C committed May 8, 2021
1 parent 9ce260c commit 9df4ec5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/parse-errors.sh
Expand Up @@ -846,10 +846,12 @@ oil_nested_proc() {
set +o errexit

_oil-parse-error 'proc p { echo 1; proc f { echo f }; echo 2 }'
_oil-parse-error 'proc p { echo 1; +weird() { echo f; }; echo 2 }'
# We now only check that procs are in the right place, because BLOCKS are
# also used in VarChecker
#_oil-parse-error 'proc p { echo 1; +weird() { echo f; }; echo 2 }'

# ksh function
_oil-parse-error 'proc p { echo 1; function f { echo f; }; echo 2 }'
#_oil-parse-error 'proc p { echo 1; function f { echo f; }; echo 2 }'

_oil-parse-error 'f() { echo 1; proc inner { echo inner; }; echo 2; }'

Expand All @@ -860,6 +862,8 @@ oil_nested_proc() {

# shell nesting is still allowed
_should-parse 'f() { echo 1; g() { echo g; }; echo 2; }'

_oil-should-parse 'proc p() { shopt --unset errexit { false hi } }'
}

oil_var_decl() {
Expand Down

0 comments on commit 9df4ec5

Please sign in to comment.