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

50 lines
1.6 KiB
Python
Raw Normal View History

2021-04-26 20:07:00 +02:00
#coding:utf-8
#
# id: bugs.core_4205
# title: ISQL -x does not output the START WITH clause of generators/sequences
2021-11-18 20:15:37 +01:00
# decription:
2021-04-26 20:07:00 +02:00
# tracker_id: CORE-4205
# min_versions: ['3.0']
# versions: 3.0
# qmid: None
import pytest
2021-11-18 20:15:37 +01:00
from firebird.qa import db_factory, python_act, Action
2021-04-26 20:07:00 +02:00
# version: 3.0
# resources: None
substitutions_1 = [('^((?!CREATE GENERATOR).)*$', '')]
init_script_1 = """
recreate sequence tmp_gen_42051 start with 9223372036854775807 increment by -2147483647;
recreate sequence tmp_gen_42052 start with -9223372036854775808 increment by 2147483647;
recreate sequence tmp_gen_42053 start with 9223372036854775807 increment by 2147483647;
recreate sequence tmp_gen_42054 start with -9223372036854775808 increment by -2147483647;
2021-11-18 20:15:37 +01:00
"""
2021-04-26 20:07:00 +02:00
db_1 = db_factory(sql_dialect=3, init=init_script_1)
# test_script_1
#---
# db_conn.close()
# runProgram('isql',[dsn,'-x','-user',user_name,'-password',user_password])
#---
2021-11-18 20:15:37 +01:00
act_1 = python_act('db_1', substitutions=substitutions_1)
2021-04-26 20:07:00 +02:00
expected_stdout_1 = """
CREATE GENERATOR TMP_GEN_42051 START WITH 9223372036854775807 INCREMENT -2147483647;
CREATE GENERATOR TMP_GEN_42052 START WITH -9223372036854775808 INCREMENT 2147483647;
CREATE GENERATOR TMP_GEN_42053 START WITH 9223372036854775807 INCREMENT 2147483647;
CREATE GENERATOR TMP_GEN_42054 START WITH -9223372036854775808 INCREMENT -2147483647;
2021-11-18 20:15:37 +01:00
"""
2021-04-26 20:07:00 +02:00
@pytest.mark.version('>=3.0')
2021-11-18 20:15:37 +01:00
def test_1(act_1: Action):
act_1.expected_stdout = expected_stdout_1
act_1.isql(switches=['-x'])
assert act_1.clean_stdout == act_1.clean_expected_stdout
2021-04-26 20:07:00 +02:00