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

29 lines
776 B
Python
Raw Permalink Normal View History

2021-04-26 20:07:00 +02:00
#coding:utf-8
2022-01-27 20:08:36 +01:00
"""
ID: issue-6746
ISSUE: 6746
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
2022-01-27 20:08:36 +01:00
DESCRIPTION:
JIRA: CORE-6517
FBTEST: bugs.core_6517
2022-01-27 20:08:36 +01:00
"""
import locale
from pathlib import Path
2021-04-26 20:07:00 +02:00
import pytest
2022-01-27 20:08:36 +01:00
from firebird.qa import *
2021-04-26 20:07:00 +02:00
2022-01-27 20:08:36 +01:00
db = db_factory()
2021-04-26 20:07:00 +02:00
2022-01-27 20:08:36 +01:00
act = python_act('db')
2021-04-26 20:07:00 +02:00
test_db = temp_file('tmp_core_6517.fdb')
2021-04-26 20:07:00 +02:00
@pytest.mark.version('>=3.0.8')
2022-01-27 20:08:36 +01:00
def test_1(act: Action, test_db: Path):
test_sql = f"""
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())