|
9 | 9 | FBTEST: bugs.core_3761
|
10 | 10 | NOTES:
|
11 | 11 | [25.11.2023] pzotov
|
12 |
| - Writing code requires more care since 6.0.0.150: ISQL does not allow specifying duplicate delimiters without any statements between them (two semicolon, two carets etc). |
| 12 | + Writing code requires more care since 6.0.0.150: ISQL does not allow specifying duplicate |
| 13 | + delimiters without any statements between them (two semicolon, two carets etc). |
| 14 | +
|
| 15 | + [28.06.2025] pzotov |
| 16 | + Separated expected output for FB major versions prior/since 6.x. |
| 17 | + No substitutions are used to suppress schema and quotes. Discussed with dimitr, 24.06.2025 12:39. |
| 18 | +
|
| 19 | + Checked on 6.0.0.876; 5.0.3.1668; 4.0.6.3214; 3.0.13.33813. |
13 | 20 | """
|
14 | 21 |
|
15 | 22 | import pytest
|
16 | 23 | from firebird.qa import *
|
17 | 24 |
|
18 |
| -init_script = """ |
19 |
| - create exception check_exception 'check exception'; |
20 |
| - commit; |
21 |
| -""" |
22 |
| - |
23 |
| -db = db_factory(init=init_script) |
| 25 | +db = db_factory() |
24 | 26 |
|
25 | 27 | test_script = """
|
| 28 | + create exception check_exception 'check exception'; |
| 29 | + commit; |
26 | 30 | set term ^;
|
27 | 31 | execute block as
|
28 | 32 | begin
|
|
31 | 35 | set term ;^
|
32 | 36 | """
|
33 | 37 |
|
34 |
| -act = isql_act('db', test_script, substitutions=[('-At block line: [\\d]+, col: [\\d]+', '-At block line')]) |
| 38 | +act = isql_act('db', test_script, substitutions=[('(-)?At block line(:)?\\s+\\d+.*', '')]) |
35 | 39 |
|
36 |
| -expected_stdout = """ |
| 40 | +expected_stdout_5x = """ |
37 | 41 | Statement failed, SQLSTATE = HY000
|
38 | 42 | exception 1
|
39 | 43 | -CHECK_EXCEPTION
|
40 | 44 | -word
|
41 |
| - -At block line: 4, col: 2 |
42 | 45 | """
|
43 | 46 |
|
44 |
| -@pytest.mark.version('>=3') |
| 47 | +expected_stdout_6x = """ |
| 48 | + Statement failed, SQLSTATE = HY000 |
| 49 | + exception 1 |
| 50 | + -"PUBLIC"."CHECK_EXCEPTION" |
| 51 | + -word |
| 52 | +""" |
| 53 | + |
| 54 | +@pytest.mark.version('>=3.0') |
45 | 55 | def test_1(act: Action):
|
46 |
| - act.expected_stdout = expected_stdout |
| 56 | + act.expected_stdout = expected_stdout_5x if act.is_version('<6') else expected_stdout_6x |
47 | 57 | act.execute(combine_output = True)
|
48 | 58 | assert act.clean_stdout == act.clean_expected_stdout
|
49 |
| - |
|
0 commit comments