6
0
mirror of https://github.com/FirebirdSQL/firebird-qa.git synced 2025-01-22 13:33:07 +01:00

Added/Updated tests\bugs\core_6517_test.py: Refactored, plus added combine_output in order to see STDERR content

This commit is contained in:
pavel-zotov 2024-05-10 01:19:51 +03:00
parent 6d39fdf0b3
commit f01cc06f40

View File

@ -3,15 +3,15 @@
""" """
ID: issue-6746 ID: issue-6746
ISSUE: 6746 ISSUE: 6746
TITLE: Regression: CREATE DATABASE fails with 'Token unknown' error when DB name is TITLE: Regression: CREATE DATABASE fails with 'Token unknown' error when DB name is enclosed in double quotes and 'DEFAULT CHARACTER SET' is specified after DB name
enclosed in double quotes and 'DEFAULT CHARACTER SET' is specified after DB name
DESCRIPTION: DESCRIPTION:
JIRA: CORE-6517 JIRA: CORE-6517
FBTEST: bugs.core_6517 FBTEST: bugs.core_6517
""" """
import locale
from pathlib import Path
import pytest import pytest
from pathlib import Path
from firebird.qa import * from firebird.qa import *
db = db_factory() db = db_factory()
@ -22,5 +22,7 @@ test_db = temp_file('tmp_core_6517.fdb')
@pytest.mark.version('>=3.0.8') @pytest.mark.version('>=3.0.8')
def test_1(act: Action, test_db: Path): def test_1(act: Action, test_db: Path):
act.isql(switches=[], input=f'create database "{act.get_dsn(test_db)}" default character set utf8;', test_sql = f"""
connect_db=False) create database "{act.get_dsn(test_db)}" default character set utf8;
"""
act.isql(switches = ['-q'], input = test_sql, connect_db = False, combine_output = True, io_enc = locale.getpreferredencoding())