mirror of
https://github.com/FirebirdSQL/firebird-qa.git
synced 2025-01-22 21:43:06 +01:00
52 lines
1.2 KiB
Python
52 lines
1.2 KiB
Python
#coding:utf-8
|
|
|
|
"""
|
|
ID: issue-2655
|
|
ISSUE: 2655
|
|
TITLE: Problem with column names with Accents and triggers
|
|
DESCRIPTION:
|
|
JIRA: CORE-2227
|
|
FBTEST: bugs.core_2227
|
|
NOTES:
|
|
[25.1.2022] pcisar
|
|
For yet unknown reason, ISQL gets malformed stdin from act.execute() although it was passed
|
|
correctly encoded in iso8859_1. Test changed to use script file writen in iso8859_1
|
|
which works fine.
|
|
[06.10.2022] pzotov
|
|
Could not complete adjusting for LINUX in new-qa.
|
|
DEFERRED.
|
|
"""
|
|
import platform
|
|
import pytest
|
|
from pathlib import Path
|
|
from firebird.qa import *
|
|
|
|
init_script = """
|
|
RECREATE TABLE TESTING (
|
|
"CÓDIGO" INTEGER
|
|
);
|
|
"""
|
|
|
|
db = db_factory(charset='ISO8859_1', init=init_script)
|
|
|
|
test_script = """
|
|
SET TERM ^;
|
|
CREATE TRIGGER TESTING_I FOR TESTING
|
|
ACTIVE BEFORE INSERT POSITION 0
|
|
AS
|
|
BEGIN
|
|
NEW."CÓDIGO" = 1;
|
|
END
|
|
^
|
|
"""
|
|
|
|
act = isql_act('db', test_script)
|
|
|
|
script_file = temp_file('test_script.sql')
|
|
|
|
@pytest.mark.skipif(platform.system() != 'Windows', reason='FIXME: see notes')
|
|
@pytest.mark.version('>=3')
|
|
def test_1(act: Action, script_file: Path):
|
|
script_file.write_text(test_script, encoding='iso8859_1')
|
|
act.isql(switches=[], input_file=script_file)
|