6
0
mirror of https://github.com/FirebirdSQL/firebird-qa.git synced 2025-01-22 13:33:07 +01:00
firebird-qa/tests/bugs/core_2922_test.py

68 lines
1.6 KiB
Python
Raw Permalink Normal View History

2021-04-26 20:07:00 +02:00
#coding:utf-8
2022-01-21 18:49:26 +01:00
"""
ID: issue-3305
ISSUE: 3305
TITLE: Character set used in constants is not registered as dependency
DESCRIPTION:
JIRA: CORE-2922
FBTEST: bugs.core_2922
2022-01-21 18:49:26 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-21 18:49:26 +01:00
import pytest
from firebird.qa import *
2021-04-26 20:07:00 +02:00
2022-01-21 18:49:26 +01:00
db = db_factory(charset='utf8')
2021-04-26 20:07:00 +02:00
2022-01-21 18:49:26 +01:00
test_script = """
2021-04-26 20:07:00 +02:00
set term ^;
create or alter procedure p1 as
declare variable a varchar(10) character set win1250;
begin
rdb$set_context('user_session', 'x', :a);
end
^
create or alter procedure p2 as
begin
post_event _win1250'abc';
end
^
set term ;^
commit;
2021-12-19 22:25:36 +01:00
2021-04-26 20:07:00 +02:00
-- show proc;
2021-08-03 23:29:08 +02:00
set width dep_name 10;
2021-04-26 20:07:00 +02:00
set width dep_on 10;
set width dep_on_type 20;
set list on;
select rd.rdb$dependent_name dep_name, rd.rdb$depended_on_name dep_on,rt.rdb$type_name dep_on_type
from rdb$dependencies rd
join rdb$types rt on
rd.rdb$depended_on_type = rt.rdb$type
and rt.rdb$type_name containing upper('COLLATION')
order by dep_name, dep_on
;
2021-12-22 20:23:11 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-21 18:49:26 +01:00
act = isql_act('db', test_script)
2021-04-26 20:07:00 +02:00
2022-01-21 18:49:26 +01:00
expected_stdout = """
DEP_NAME P1
DEP_ON UTF8
DEP_ON_TYPE COLLATION
DEP_NAME P1
DEP_ON WIN1250
DEP_ON_TYPE COLLATION
DEP_NAME P2
DEP_ON WIN1250
DEP_ON_TYPE COLLATION
2021-08-03 23:29:08 +02:00
"""
2021-04-26 20:07:00 +02:00
@pytest.mark.version('>=3.0')
2022-01-21 18:49:26 +01:00
def test_1(act: Action):
act.expected_stdout = expected_stdout
act.execute()
assert act.clean_stdout == act.clean_expected_stdout
2021-04-26 20:07:00 +02:00