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_2804_test.py

49 lines
1.4 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-3192
ISSUE: 3192
TITLE: Problems with COMMENT ON and strings using introducer (charset)
DESCRIPTION:
JIRA: CORE-2804
FBTEST: bugs.core_2804
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(from_backup='core2804-ods11.fbk')
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
-- Database was prepared with following statements:
-- recreate table test1(id int);
-- recreate table test2(id int);
-- commit;
-- comment on table test1 is _win1251 'win1251: <cyrillic text here encoded with win1251>';
-- comment on table test2 is _unicode_fss 'unicode_fss: <cyrillic text here encoded with UTF8>';
-- commit;
set blob all;
set list on;
select r.rdb$description as descr_blob_id
from rdb$relations r where r.rdb$relation_name in ( upper('test1'), upper('test2') )
order by r.rdb$relation_name;
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, substitutions=[('DESCR_BLOB_ID.*', '')])
2021-04-26 20:07:00 +02:00
2022-01-21 18:49:26 +01:00
expected_stdout = """
2021-04-26 20:07:00 +02:00
DESCR_BLOB_ID 0:3
win1251: Протокол собрания об уплотнении квартир дома
DESCR_BLOB_ID 0:6
2022-01-21 18:49:26 +01:00
unicode_fss: Протокол собрания о помощи детям Германии
2021-12-22 20:23:11 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-21 18:49:26 +01:00
@pytest.mark.version('>=3')
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