6
0
mirror of https://github.com/FirebirdSQL/firebird-qa.git synced 2025-01-23 05:53:06 +01:00
firebird-qa/tests/bugs/core_1058_test.py

41 lines
1.1 KiB
Python
Raw Normal View History

2021-04-26 20:07:00 +02:00
#coding:utf-8
2022-01-19 17:54:56 +01:00
"""
ID: issue-1479
ISSUE: https://github.com/FirebirdSQL/firebird/issues/1479
2022-01-19 17:54:56 +01:00
TITLE: ALTER DOMAIN and ALTER TABLE don't allow to change character set and/or collation
DESCRIPTION:
JIRA: CORE-1058
FBTEST: bugs.core_1058
NOTES:
[05.10.2023] pzotov
Removed SHOW command for check result because its output often changes.
It is enough for this test to verify just absense of any error messages.
2022-01-19 17:54:56 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-19 17:54:56 +01:00
import pytest
from firebird.qa import *
2021-04-26 20:07:00 +02:00
2022-01-19 17:54:56 +01:00
db = db_factory(init=init_script)
2021-04-26 20:07:00 +02:00
test_script = """
create domain dm_test varchar(10) character set win1251;
create table test1(s dm_test);
create table test2(s varchar(10) character set win1251);
---------
alter domain dm_test varchar(10) character set utf8;
alter domain dm_test varchar(10) character set utf8 collate unicode_ci;
2021-04-26 20:07:00 +02:00
"""
2022-01-19 17:54:56 +01:00
act = isql_act('db', test_script)
2021-04-26 20:07:00 +02:00
expected_stdout = """
2021-04-26 20:07:00 +02:00
"""
2022-01-19 17:54:56 +01:00
@pytest.mark.version('>=3')
def test_1(act: Action):
act.expected_stdout = expected_stdout
act.execute(combine_output = True)
2022-01-19 17:54:56 +01:00
assert act.clean_stdout == act.clean_expected_stdout
2021-04-26 20:07:00 +02:00