2021-04-26 20:07:00 +02:00
|
|
|
#coding:utf-8
|
|
|
|
|
2022-01-18 20:45:21 +01:00
|
|
|
"""
|
|
|
|
ID: issue-1211
|
|
|
|
ISSUE: 1211
|
|
|
|
TITLE: Accent ignoring collation for unicode
|
|
|
|
DESCRIPTION:
|
|
|
|
JIRA: CORE-824
|
2022-02-02 15:46:19 +01:00
|
|
|
FBTEST: bugs.core_0824
|
2022-01-18 20:45:21 +01:00
|
|
|
"""
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-18 20:45:21 +01:00
|
|
|
import pytest
|
|
|
|
from firebird.qa import *
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-18 20:45:21 +01:00
|
|
|
db = db_factory(charset='UTF8')
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-18 20:45:21 +01:00
|
|
|
test_script = """SELECT IIF('eeaauoeeeaauo' = 'ÉÈÀÂÛÔÊéèàâûô' COLLATE UNICODE_CI_AI ,'true','false'),'true','''eeaauoeeeaauo'' = ''ÉÈÀÂÛÔÊéèàâûô'' COLLATE UNICODE_CI_AI' FROM RDB$DATABASE;
|
2021-04-26 20:07:00 +02:00
|
|
|
SELECT IIF('EEAAUOEEEAAUO' = 'ÉÈÀÂÛÔÊéèàâûô' COLLATE UNICODE_CI_AI ,'true','false'),'true','''EEAAUOEEEAAUO'' = ''ÉÈÀÂÛÔÊéèàâûô'' COLLATE UNICODE_CI_AI' FROM RDB$DATABASE;
|
|
|
|
"""
|
|
|
|
|
2022-01-18 20:45:21 +01:00
|
|
|
act = isql_act('db', test_script)
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-18 20:45:21 +01:00
|
|
|
expected_stdout = """
|
2021-04-26 20:07:00 +02:00
|
|
|
CASE CONSTANT CONSTANT
|
|
|
|
====== ======== =======================================================
|
|
|
|
true true 'eeaauoeeeaauo' = 'ÉÈÀÂÛÔÊéèàâûô' COLLATE UNICODE_CI_AI
|
|
|
|
|
|
|
|
|
|
|
|
CASE CONSTANT CONSTANT
|
|
|
|
====== ======== =======================================================
|
|
|
|
true true 'EEAAUOEEEAAUO' = 'ÉÈÀÂÛÔÊéèàâûô' COLLATE UNICODE_CI_AI
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
@pytest.mark.version('>=3.0')
|
2022-01-18 20:45:21 +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
|
|
|
|