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

73 lines
2.1 KiB
Python
Raw Normal View History

2021-04-26 20:07:00 +02:00
#coding:utf-8
2022-01-21 18:49:26 +01:00
"""
ID: issue-3117
ISSUE: 3117
TITLE: Issue with SIMILAR TO and UTF8 on 2.5 Beta 2 (and 1)
DESCRIPTION:
JIRA: CORE-2721
"""
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='core2721.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
set list on;
set count on;
select * from test where utf8field similar to 'DELL %';
select * from test where utf8field similar to 'DE %';
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 = """
2021-04-26 20:07:00 +02:00
ANSIFIELD DELL COMPUTERS
UTF8FIELD DELL COMPUTERS
UNICODECIFIELD DELL COMPUTERS
2022-01-21 18:49:26 +01:00
2021-04-26 20:07:00 +02:00
ANSIFIELD DELL BV
UTF8FIELD DELL BV
UNICODECIFIELD DELL BV
2022-01-21 18:49:26 +01:00
2021-04-26 20:07:00 +02:00
ANSIFIELD DELL BV-GLOBAL COMMUNITY
UTF8FIELD DELL BV-GLOBAL COMMUNITY
UNICODECIFIELD DELL BV-GLOBAL COMMUNITY
Records affected: 3
2022-01-21 18:49:26 +01:00
2021-04-26 20:07:00 +02:00
ANSIFIELD DE HEER P.W. BALFOORT
UTF8FIELD DE HEER P.W. BALFOORT
UNICODECIFIELD DE HEER P.W. BALFOORT
2022-01-21 18:49:26 +01:00
2021-04-26 20:07:00 +02:00
ANSIFIELD DE DRIESTAR
UTF8FIELD DE DRIESTAR
UNICODECIFIELD DE DRIESTAR
2022-01-21 18:49:26 +01:00
2021-04-26 20:07:00 +02:00
ANSIFIELD DE SINGEL
UTF8FIELD DE SINGEL
UNICODECIFIELD DE SINGEL
2022-01-21 18:49:26 +01:00
2021-04-26 20:07:00 +02:00
ANSIFIELD DE BOER PLASTIK B.V.
UTF8FIELD DE BOER PLASTIK B.V.
UNICODECIFIELD DE BOER PLASTIK B.V.
2022-01-21 18:49:26 +01:00
2021-04-26 20:07:00 +02:00
ANSIFIELD DE LOOT PC REPAIR
UTF8FIELD DE LOOT PC REPAIR
UNICODECIFIELD DE LOOT PC REPAIR
2022-01-21 18:49:26 +01:00
2021-04-26 20:07:00 +02:00
ANSIFIELD DE HEER P.W. BALFOORT
UTF8FIELD DE HEER P.W. BALFOORT
UNICODECIFIELD DE HEER P.W. BALFOORT
2022-01-21 18:49:26 +01:00
2021-04-26 20:07:00 +02:00
Records affected: 6
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