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

69 lines
1.3 KiB
Python
Raw Normal View History

2021-04-26 20:07:00 +02:00
#coding:utf-8
#
# id: bugs.core_4203
# title: Cannot create packaged routines with [VAR]CHAR parameters
# decription:
# tracker_id: CORE-4203
# min_versions: ['3.0']
# versions: 3.0
# qmid: None
import pytest
from firebird.qa import db_factory, isql_act, Action
# version: 3.0
# resources: None
substitutions_1 = []
init_script_1 = """"""
db_1 = db_factory(page_size=4096, sql_dialect=3, init=init_script_1)
test_script_1 = """
set term ^;
create package test1 as
begin
function f1(x char(3)) returns char(6) ;
end
^
commit ^
create package body test1 as
begin
function f1(x char(3)) returns char(6) as
begin
return x;
end
end
^
show package test1
^
"""
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
expected_stdout_1 = """
TEST1
Header source:
begin
function f1(x char(3)) returns char(6) ;
end
Body source:
begin
function f1(x char(3)) returns char(6) as
begin
return x;
end
end
"""
@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()
assert act_1.clean_expected_stdout == act_1.clean_stdout