diff --git a/tests/bugs/core_3314_test.py b/tests/bugs/core_3314_test.py index a37625f1..9f865e03 100644 --- a/tests/bugs/core_3314_test.py +++ b/tests/bugs/core_3314_test.py @@ -8,38 +8,49 @@ TITLE: Dependencies are not removed after dropping the procedure and the t DESCRIPTION: JIRA: CORE-3314 FBTEST: bugs.core_3314 +NOTES: + [25.11.2023] pzotov + 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). """ import pytest from firebird.qa import * -init_script = """create table t (a int); -SET TERM !!; -create procedure p as begin delete from t; end!! -SET TERM !!; -commit; +init_script = """ + create table test (a int); + set term ^; + create procedure p as + begin + delete from test; + end + ^ + set term ;^ + commit; """ db = db_factory(init=init_script) -test_script = """SELECT 1 FROM RDB$DEPENDENCIES WHERE RDB$DEPENDED_ON_NAME='T'; -drop procedure p; -drop table t; -commit; -SELECT 1 FROM RDB$DEPENDENCIES WHERE RDB$DEPENDED_ON_NAME='T'; +test_script = """ + set list on; + set count on; + select 1 as point_1 from rdb$dependencies where rdb$depended_on_name = upper('test'); + drop procedure p; + drop table test; + commit; + select 1 as point_2 from rdb$dependencies where rdb$depended_on_name = upper('test'); """ act = isql_act('db', test_script) expected_stdout = """ - CONSTANT -============ - 1 + POINT_1 1 + Records affected: 1 + Records affected: 0 """ @pytest.mark.version('>=3') def test_1(act: Action): act.expected_stdout = expected_stdout - act.execute() + act.execute(combine_output = True) assert act.clean_stdout == act.clean_expected_stdout