8000 Added/Updated tests\bugs\core_3761_test.py: Separated expected output… · FirebirdSQL/firebird-qa@8ac9f15 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8ac9f15

Browse files
committed
Added/Updated tests\bugs\core_3761_test.py: Separated expected output for FB major versions prior/since 6.x. Checked on 6.0.0.876; 5.0.3.1668; 4.0.6.3214; 3.0.13.33813.
1 parent 0b0db13 commit 8ac9f15

File tree

1 file changed

+22
-13
lines changed

1 file changed

+22
-13
lines changed

tests/bugs/core_3761_test.py

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,24 @@
99
FBTEST: bugs.core_3761
1010
NOTES:
1111
[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.
1320
"""
1421

1522
import pytest
1623
from firebird.qa import *
1724

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()
2426

2527
test_script = """
28+
create exception check_exception 'check exception';
29+
commit;
2630
set term ^;
2731
execute block as
2832
begin
@@ -31,19 +35,24 @@
3135
set term ;^
3236
"""
3337

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+.*', '')])
3539

36-
expected_stdout = """
40+
expected_stdout_5x = """
3741
Statement failed, SQLSTATE = HY000
3842
exception 1
3943
-CHECK_EXCEPTION
4044
-word
41-
-At block line: 4, col: 2
4245
"""
4346

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')
4555
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
4757
act.execute(combine_output = True)
4858
assert act.clean_stdout == act.clean_expected_stdout
49-

0 commit comments

Comments
 (0)
0