6
0
mirror of https://github.com/FirebirdSQL/firebird-qa.git synced 2025-01-23 22:13:05 +01:00
firebird-qa/tests/bugs/core_4440_test.py

35 lines
687 B
Python

#coding:utf-8
"""
ID: issue-4760
ISSUE: 4760
TITLE: isql crash without connect when execute command "show version"
DESCRIPTION:
JIRA: CORE-4440
FBTEST: bugs.core_4440
"""
import pytest
from firebird.qa import *
db = db_factory()
test_script = """
show version;
set list on;
select current_user from rdb$database;
"""
act = isql_act('db', test_script, substitutions=[('^((?!SYSDBA).)*$', '')])
expected_stdout = """
USER SYSDBA
"""
@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