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

Added/Updated tests\bugs\gh_7482_test.py: Checked on 5.0.0.958, intermediate build of 24-feb-2023. All OK.

This commit is contained in:
pavel-zotov 2023-02-24 19:41:30 +03:00
parent c112b66dc4
commit 2e935208a8

View File

@ -0,0 +1,36 @@
#coding:utf-8
"""
ID: issue-7482
ISSUE: 7482
TITLE: Simple SQL crashes firebird: select cast(rdb$db_key as integer) from rdb$database
NOTES:
[14.02.2023] pzotov
Checked on 5.0.0.958, intermediate build of 24-feb-2023. All OK.
"""
import pytest
from firebird.qa import *
db = db_factory()
test_script = """
set list on;
set blob all;
set sqlda_display on;
select blob_append(null, null) as blob_result from rdb$database;
"""
act = isql_act('db', test_script, substitutions = [('^((?!sqltype:|BLOB_RESULT).)*$', ''), ('[ \t]+', ' ')])
expected_stdout = """
01: sqltype: 520 BLOB Nullable scale: 0 subtype: 0 len: 8
: name: BLOB_APPEND alias: BLOB_RESULT
BLOB_RESULT <null>
"""
@pytest.mark.version('>=5.0')
def test_1(act: Action):
act.expected_stdout = expected_stdout
act.execute()
assert act.clean_stdout == act.clean_expected_stdout