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

55 lines
1.2 KiB
Python
Raw Normal View History

2021-04-26 20:07:00 +02:00
#coding:utf-8
2022-01-25 22:55:48 +01:00
"""
ID: issue-5590
ISSUE: 5590
TITLE: Data type unknown error with LIST
DESCRIPTION:
JIRA: CORE-5313
FBTEST: bugs.core_5313
2022-01-25 22:55:48 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-25 22:55:48 +01:00
import pytest
from firebird.qa import *
2021-04-26 20:07:00 +02:00
2022-01-25 22:55:48 +01:00
db = db_factory()
2021-04-26 20:07:00 +02:00
2022-01-25 22:55:48 +01:00
test_script = """
set planonly;
set sqlda_display on;
2021-04-26 20:07:00 +02:00
select list(trim(rdb$relation_name), ?) from rdb$relations;
2021-12-22 20:23:11 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-25 22:55:48 +01:00
act = isql_act('db', test_script)
2021-04-26 20:07:00 +02:00
2022-01-25 22:55:48 +01:00
expected_stdout = """
2021-04-26 20:07:00 +02:00
INPUT message field count: 1
2021-10-21 19:29:23 +02:00
01: sqltype: 452 TEXT scale: 0 subtype: 0 len: 4 charset: 4 UTF8
2021-04-26 20:07:00 +02:00
: name: alias:
: table: owner:
PLAN (RDB$RELATIONS NATURAL)
OUTPUT message field count: 1
2021-10-21 19:29:23 +02:00
01: sqltype: 520 BLOB Nullable scale: 0 subtype: 1 len: 8 charset: 4 UTF8
2021-04-26 20:07:00 +02:00
: name: LIST alias: LIST
: table: owner:
2021-12-22 20:23:11 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-25 22:55:48 +01:00
# version: 3.0
@pytest.mark.version('>=3.0.1,<4.0')
2022-01-25 22:55:48 +01:00
def test_1(act: Action):
act.expected_stdout = expected_stdout
act.execute(charset='utf8')
assert act.clean_stdout == act.clean_expected_stdout
2021-04-26 20:07:00 +02:00
# version: 4.0
@pytest.mark.version('>=4.0')
2022-01-25 22:55:48 +01:00
def test_2(act: Action):
act.expected_stdout = expected_stdout
act.execute()
assert act.clean_stdout == act.clean_expected_stdout