2021-04-26 20:07:00 +02:00
|
|
|
#coding:utf-8
|
|
|
|
|
2022-01-21 18:49:26 +01:00
|
|
|
"""
|
|
|
|
ID: issue-3217
|
2023-12-10 11:12:05 +01:00
|
|
|
ISSUE: https://github.com/FirebirdSQL/firebird/issues/3217
|
2022-01-21 18:49:26 +01:00
|
|
|
TITLE: isql shouldn't display db and user name when extracting a script
|
|
|
|
DESCRIPTION:
|
|
|
|
JIRA: CORE-2831
|
2022-02-02 15:46:19 +01:00
|
|
|
FBTEST: bugs.core_2831
|
2023-12-10 11:12:05 +01:00
|
|
|
NOTES:
|
|
|
|
[10.12.2023] pzotov
|
|
|
|
Added 'SQLSTATE' in substitutions: runtime error must not be filtered out by '?!(...)' pattern
|
|
|
|
("negative lookahead assertion", see https://docs.python.org/3/library/re.html#regular-expression-syntax).
|
|
|
|
Added 'combine_output = True' in order to see SQLSTATE if any error occurs.
|
2022-01-21 18:49:26 +01:00
|
|
|
"""
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-21 18:49:26 +01:00
|
|
|
import pytest
|
|
|
|
from firebird.qa import *
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-21 18:49:26 +01:00
|
|
|
db = db_factory()
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2023-12-10 11:12:05 +01:00
|
|
|
act = python_act('db', substitutions=[('^((?!(SQLSTATE|Database:|User:)).)*$', '')])
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2021-11-16 19:44:53 +01:00
|
|
|
@pytest.mark.version('>=3.0')
|
2022-01-21 18:49:26 +01:00
|
|
|
def test_1(act: Action):
|
2023-12-10 11:12:05 +01:00
|
|
|
act.expected_stdout = ""
|
|
|
|
act.isql(switches=['-x'], combine_output = True)
|
2022-01-21 18:49:26 +01:00
|
|
|
assert act.clean_stdout == act.clean_expected_stdout
|