Skip to content

Commit 5ae860d

Browse files
committed
Added/Updated tests\bugs\core_0190_test.py: Checked on 3.0.11.33665, 4.0.3.2904, 5.0.0.970
1 parent 16af5f2 commit 5ae860d

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

tests/bugs/core_0190_test.py

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#coding:utf-8
2+
3+
"""
4+
ID: issue-517
5+
ISSUE: https://github.com/FirebirdSQL/firebird/issues/517
6+
TITLE: trigger with except-s on view with union
7+
NOTES:
8+
Test should be added during initial migration from fbtest but did not, the reason is unknown.
9+
Noted by Anton Zuev: https://github.com/FirebirdSQL/firebird-qa/pull/5
10+
Checked on 3.0.11.33665, 4.0.3.2904, 5.0.0.970
11+
"""
12+
13+
import pytest
14+
from firebird.qa import *
15+
16+
db = db_factory()
17+
18+
test_script = """
19+
create table a (id integer);
20+
21+
create view v1 (vid) as
22+
select id from a
23+
union all
24+
select id from a;
25+
26+
create exception exa 'foo!..';
27+
create exception exb 'bar!..';
28+
commit;
29+
30+
set term ^;
31+
create trigger tv1 for v1 active before update as
32+
begin
33+
if (new.vid = 0) then
34+
exception exa;
35+
else
36+
exception exb;
37+
end
38+
^
39+
set term ;^
40+
commit;
41+
"""
42+
43+
act = isql_act('db', test_script)
44+
45+
@pytest.mark.version('>=3.0')
46+
def test_1(act: Action):
47+
act.expected_stdout = ''
48+
act.execute(combine_output = True)
49+
assert act.clean_stdout == act.clean_expected_stdout

0 commit comments

Comments
 (0)