6
0
mirror of https://github.com/FirebirdSQL/firebird-qa.git synced 2025-01-22 21:43:06 +01:00
firebird-qa/tests/bugs/core_1331_test.py

63 lines
1.4 KiB
Python
Raw Normal View History

2021-04-26 20:07:00 +02:00
#coding:utf-8
#
# id: bugs.core_1331
# title: Charset transliterations don't work with EXECUTE STATEMENT
2022-01-16 10:03:34 +01:00
# decription:
2021-04-26 20:07:00 +02:00
# tracker_id: CORE-1331
# min_versions: []
# versions: 3.0
# qmid: bugs.core_1331
import pytest
from firebird.qa import db_factory, isql_act, Action
# version: 3.0
# resources: None
substitutions_1 = []
init_script_1 = """"""
2022-01-16 10:03:34 +01:00
db_1 = db_factory(from_backup='core1331-25.fbk', init=init_script_1, charset='utf8')
2021-04-26 20:07:00 +02:00
test_script_1 = """
set list on;
select opis as direct_select from T1;
set term ^ ;
execute block returns ( execute_block_select varchar(100) ) as
BEGIN
for select opis from t1
into :execute_block_select
do
SUSPEND;
END^
execute block returns ( execute_sttm_select varchar(100) ) as
BEGIN
for execute statement 'select opis from t1'
into :execute_sttm_select
do
SUSPEND;
END ^
set term ;^
"""
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
expected_stdout_1 = """
DIRECT_SELECT ASCII
DIRECT_SELECT милан
EXECUTE_BLOCK_SELECT ASCII
EXECUTE_BLOCK_SELECT милан
EXECUTE_STTM_SELECT ASCII
EXECUTE_STTM_SELECT милан
2021-12-22 20:23:11 +01:00
"""
2021-04-26 20:07:00 +02:00
@pytest.mark.version('>=3.0')
2021-04-28 12:42:11 +02:00
def test_1(act_1: Action):
2021-04-26 20:07:00 +02:00
act_1.expected_stdout = expected_stdout_1
act_1.execute()
2021-12-22 20:23:11 +01:00
assert act_1.clean_stdout == act_1.clean_expected_stdout
2021-04-26 20:07:00 +02:00