This repository was archived by the owner on Aug 30, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
standalone/src/test/java/com/trivadis/plsql/formatter/settings/tests/issues Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2075,12 +2075,18 @@ r3_case_expressions:
20752075 & parent < node
20762076;
20772077
2078+ r3_no_commands:
2079+ [node) sqlplus_command & [oserror) 'OSERROR' & [oserror+1 = [node
2080+ ;
2081+
20782082r3_commands:
2079- r3_sqlplus_commands
2080- | r3_sql_commands
2081- | r3_plsql_commands
2082- | r3_plsql_keywords
2083- | r3_case_expressions
2083+ (
2084+ r3_sqlplus_commands
2085+ | r3_sql_commands
2086+ | r3_plsql_commands
2087+ | r3_plsql_keywords
2088+ | r3_case_expressions
2089+ ) - r3_no_commands
20842090-> {
20852091 var node = tuple.get("node");
20862092 // do not add a line break on the first line.
Original file line number Diff line number Diff line change 1+ package com .trivadis .plsql .formatter .settings .tests .issues ;
2+
3+ import com .trivadis .plsql .formatter .settings .ConfiguredTestFormatter ;
4+ import org .junit .jupiter .api .Test ;
5+ import org .junit .jupiter .api .TestInstance ;
6+
7+ import java .io .IOException ;
8+
9+ @ TestInstance (TestInstance .Lifecycle .PER_CLASS )
10+ public class Issue_264_exit_in_whenever_oserror extends ConfiguredTestFormatter {
11+ @ Test
12+ public void exit_in_whenever_os_error () throws IOException {
13+ var input = """
14+ whenever sqlerror exit failure
15+ whenever oserror exit failure
16+ select * from dual;
17+ """ ;
18+ formatAndAssert (input );
19+ }
20+ }
You can’t perform that action at this time.
0 commit comments