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

41 lines
693 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#coding:utf-8
"""
ID: issue-2778
ISSUE: 2778
TITLE: Incorrect handling of LOWER/UPPER when result string shrinks in terms of byte length
DESCRIPTION:
JIRA: CORE-2355
FBTEST: bugs.core_2355
"""
import pytest
from firebird.qa import *
db = db_factory(charset='UTF8')
test_script = """SELECT LOWER('İA') FROM RDB$DATABASE;
SELECT LOWER('AӴЁΪΣƓİ') FROM RDB$DATABASE;
"""
act = isql_act('db', test_script)
expected_stdout = """
LOWER
======
ia
LOWER
=======
aӵёϊσɠi
"""
@pytest.mark.version('>=3.0')
def test_1(act: Action):
act.expected_stdout = expected_stdout
act.execute()
assert act.clean_stdout == act.clean_expected_stdout