mirror of
https://github.com/FirebirdSQL/firebird-qa.git
synced 2025-01-22 13:33:07 +01:00
Added/Updated tests\bugs\core_3314_test.py: 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).
This commit is contained in:
parent
36d2be1871
commit
4326b911a4
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user