mirror of
https://github.com/FirebirdSQL/firebird-qa.git
synced 2025-01-22 13:33:07 +01:00
Added/Updated tests\bugs\gh_7710_test.py: Checked on intermediate build 5.0.0.1164.
This commit is contained in:
parent
0714127484
commit
2cad81bbe8
46
tests/bugs/gh_7710_test.py
Normal file
46
tests/bugs/gh_7710_test.py
Normal file
@ -0,0 +1,46 @@
|
||||
#coding:utf-8
|
||||
|
||||
"""
|
||||
ID: issue-7710
|
||||
ISSUE: https://github.com/FirebirdSQL/firebird/issues/7710
|
||||
TITLE: Expression index - more than one null value cause attempt to store duplicate value error
|
||||
DESCRIPTION:
|
||||
NOTES:
|
||||
[17.08.2023] pzotov
|
||||
Confirmed problem on 5.0.0.1163.
|
||||
Checked on intermediate build 5.0.0.1164.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
from firebird.qa import *
|
||||
|
||||
db = db_factory(charset = 'utf8')
|
||||
|
||||
test_script = """
|
||||
set bail on;
|
||||
create table test (
|
||||
field1 char(10) not null
|
||||
);
|
||||
commit;
|
||||
|
||||
insert into test(field1) values ('N');
|
||||
insert into test(field1) values ('N');
|
||||
insert into test(field1) values ('I');
|
||||
commit;
|
||||
create unique index test_i1 on test computed by (iif(field1 = 'I', 'I', null));
|
||||
commit;
|
||||
set heading off;
|
||||
select 'Ok.' from rdb$database;
|
||||
"""
|
||||
|
||||
act = isql_act('db', test_script)
|
||||
|
||||
expected_stdout = """
|
||||
Ok.
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=3.0')
|
||||
def test_1(act: Action):
|
||||
act.expected_stdout = expected_stdout
|
||||
act.execute(combine_output = True)
|
||||
assert act.clean_stdout == act.clean_expected_stdout
|
Loading…
Reference in New Issue
Block a user