mirror of
https://github.com/FirebirdSQL/firebird-qa.git
synced 2025-02-02 02:40:42 +01:00
Added/Updated tests\bugs\core_1167_test.py: Removed SHOW TABLE command for check result because its output often changes. Query to RDB$ tables is used instead.
This commit is contained in:
parent
05c9349c8f
commit
499017fae8
@ -2,35 +2,75 @@
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
ID: issue-1590
|
ID: issue-1590
|
||||||
ISSUE: 1590
|
ISSUE: https://github.com/FirebirdSQL/firebird/issues/1590
|
||||||
TITLE: CHARACTER SET GBK is not installed
|
TITLE: CHARACTER SET GBK is not installed
|
||||||
DESCRIPTION:
|
DESCRIPTION:
|
||||||
Default character set is GBK
|
Default character set is GBK
|
||||||
Create Table T1(ID integer, FName Varchar(20); -- OK
|
Create Table T1(ID integer, FName Varchar(20); -- OK
|
||||||
Commit; ---Error Message: CHARACTER SET GBK is not installed
|
Commit; ---Error Message: CHARACTER SET GBK is not installed
|
||||||
JIRA: CORE-1167
|
JIRA: CORE-1167
|
||||||
FBTEST: bugs.core_1167
|
FBTEST: bugs.core_1167
|
||||||
|
NOTES:
|
||||||
|
[05.10.2023] pzotov
|
||||||
|
Removed SHOW TABLE command for check result because its output often changes.
|
||||||
|
Query to RDB$ tables is used instead.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from firebird.qa import *
|
from firebird.qa import *
|
||||||
|
import time
|
||||||
|
|
||||||
db = db_factory(charset='GBK')
|
db = db_factory(charset = 'GBK')
|
||||||
|
|
||||||
test_script = """Create Table T1(ID integer, FName Varchar(20) CHARACTER SET GBK);
|
test_script = """
|
||||||
COMMIT;
|
recreate table t1(
|
||||||
SHOW TABLE T1;
|
f1 varchar(20) character set gbk
|
||||||
|
,f2 varchar(20) character set gbk collate gbk_unicode
|
||||||
|
);
|
||||||
|
commit;
|
||||||
|
set count on;
|
||||||
|
set list on;
|
||||||
|
select
|
||||||
|
rf.rdb$field_name as field_name
|
||||||
|
,f.rdb$character_set_id as field_cset_id
|
||||||
|
,f.rdb$collation_id as field_coll_id
|
||||||
|
,f.rdb$character_length as field_cset_len
|
||||||
|
,c.rdb$character_set_name as cset_name
|
||||||
|
,k.rdb$collation_name as field_collation
|
||||||
|
from rdb$relation_fields rf
|
||||||
|
join rdb$fields f on rf.rdb$field_source = f.rdb$field_name
|
||||||
|
join rdb$character_sets c on f.rdb$character_set_id = c.rdb$character_set_id
|
||||||
|
left join rdb$collations k on c.rdb$character_set_id = k.rdb$character_set_id and f.rdb$collation_id = k.rdb$collation_id
|
||||||
|
where rf.rdb$relation_name = upper('T1')
|
||||||
|
order by
|
||||||
|
field_name
|
||||||
|
,field_cset_id
|
||||||
|
,field_coll_id
|
||||||
|
;
|
||||||
"""
|
"""
|
||||||
|
|
||||||
act = isql_act('db', test_script)
|
act = isql_act('db', test_script)
|
||||||
|
|
||||||
expected_stdout = """ID INTEGER Nullable
|
expected_stdout = """
|
||||||
FNAME VARCHAR(20) Nullable
|
FIELD_NAME F1
|
||||||
|
FIELD_CSET_ID 67
|
||||||
|
FIELD_COLL_ID 0
|
||||||
|
FIELD_CSET_LEN 20
|
||||||
|
CSET_NAME GBK
|
||||||
|
FIELD_COLLATION GBK
|
||||||
|
|
||||||
|
FIELD_NAME F2
|
||||||
|
FIELD_CSET_ID 67
|
||||||
|
FIELD_COLL_ID 1
|
||||||
|
FIELD_CSET_LEN 20
|
||||||
|
CSET_NAME GBK
|
||||||
|
FIELD_COLLATION GBK_UNICODE
|
||||||
|
|
||||||
|
Records affected: 2
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@pytest.mark.version('>=3')
|
@pytest.mark.version('>=3')
|
||||||
def test_1(act: Action):
|
def test_1(act: Action):
|
||||||
act.expected_stdout = expected_stdout
|
act.expected_stdout = expected_stdout
|
||||||
act.execute()
|
act.execute(combine_output = True)
|
||||||
assert act.clean_stdout == act.clean_expected_stdout
|
assert act.clean_stdout == act.clean_expected_stdout
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user