mirror of
https://github.com/FirebirdSQL/firebird-qa.git
synced 2025-01-22 13:33:07 +01:00
Added/Updated tests\bugs\core_3675_test.py: Removed SHOW command for check result because its output often changes.
This commit is contained in:
parent
eff0d49c92
commit
15e33b7a64
@ -7,38 +7,96 @@ TITLE: CREATE INDEX considers NULL and empty string being the same in comp
|
||||
DESCRIPTION:
|
||||
JIRA: CORE-3675
|
||||
FBTEST: bugs.core_3675
|
||||
[05.10.2023] pzotov
|
||||
Removed SHOW command for check result because its output often changes.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
from firebird.qa import *
|
||||
|
||||
db = db_factory(from_backup='core3675.fbk')
|
||||
db = db_factory()
|
||||
|
||||
test_script = """
|
||||
show table t;
|
||||
select * from t;
|
||||
set bail on;
|
||||
set list on;
|
||||
recreate table test(
|
||||
f1 varchar(1)
|
||||
,f2 varchar(1)
|
||||
,f3 varchar(1)
|
||||
,f4 varchar(1)
|
||||
,id int primary key
|
||||
,constraint test_unq unique(f1,f2,f3,f4)
|
||||
);
|
||||
commit;
|
||||
insert into test values('a', 'b', 'c', 'd', 1);
|
||||
insert into test values('a', null, 'c', 'd', 2);
|
||||
insert into test values('a', '', 'c', 'd', 3);
|
||||
insert into test values('a', 'b', null, 'd', 4);
|
||||
insert into test values('a', 'b', null, '', 5);
|
||||
insert into test values('a', 'b', '', null, 6);
|
||||
insert into test values('a', 'b', null, null, 7);
|
||||
insert into test values('a', null, null, null, 8);
|
||||
insert into test values(null, null, null, null, 9);
|
||||
commit;
|
||||
select id,f1,f2,f3,f4 from test order by id;
|
||||
"""
|
||||
|
||||
act = isql_act('db', test_script)
|
||||
|
||||
expected_stdout = """
|
||||
F1 VARCHAR(1) Nullable
|
||||
F2 VARCHAR(1) Nullable
|
||||
F3 VARCHAR(1) Nullable
|
||||
F4 VARCHAR(1) Nullable
|
||||
CONSTRAINT T1_UNQ:
|
||||
Unique key (F1, F2, F3, F4)
|
||||
F1 F2 F3 F4
|
||||
====== ====== ====== ======
|
||||
a b c d
|
||||
a <null> c d
|
||||
a c d
|
||||
a b <null> d
|
||||
a b <null>
|
||||
a b <null>
|
||||
a b <null> <null>
|
||||
a <null> <null> <null>
|
||||
<null> <null> <null> <null>
|
||||
ID 1
|
||||
F1 a
|
||||
F2 b
|
||||
F3 c
|
||||
F4 d
|
||||
|
||||
ID 2
|
||||
F1 a
|
||||
F2 <null>
|
||||
F3 c
|
||||
F4 d
|
||||
|
||||
ID 3
|
||||
F1 a
|
||||
F2
|
||||
F3 c
|
||||
F4 d
|
||||
|
||||
ID 4
|
||||
F1 a
|
||||
F2 b
|
||||
F3 <null>
|
||||
F4 d
|
||||
|
||||
ID 5
|
||||
F1 a
|
||||
F2 b
|
||||
F3 <null>
|
||||
F4
|
||||
|
||||
ID 6
|
||||
F1 a
|
||||
F2 b
|
||||
F3
|
||||
F4 <null>
|
||||
|
||||
ID 7
|
||||
F1 a
|
||||
F2 b
|
||||
F3 <null>
|
||||
F4 <null>
|
||||
|
||||
ID 8
|
||||
F1 a
|
||||
F2 <null>
|
||||
F3 <null>
|
||||
F4 <null>
|
||||
|
||||
ID 9
|
||||
F1 <null>
|
||||
F2 <null>
|
||||
F3 <null>
|
||||
F4 <null>
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=3')
|
||||
|
Loading…
Reference in New Issue
Block a user