Skip to content

Commit 5515051

Browse files
committed
Added/Updated tests\functional\sqlancer\osdi20_rigger_example_05_test.py: adapted from article provided in SQLancer documentation.
1 parent a70e4e2 commit 5515051

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#coding:utf-8
2+
3+
"""
4+
ID: n/a
5+
ISSUE: https://www.usenix.org/system/files/osdi20-rigger.pdf
6+
TITLE: Incorrect result of LIKE.
7+
DESCRIPTION:
8+
https://www.usenix.org/system/files/osdi20-rigger.pdf
9+
page 10 listing 5
10+
"""
11+
12+
import pytest
13+
from firebird.qa import *
14+
15+
db = db_factory()
16+
17+
test_script = """
18+
set list on;
19+
create collation name_coll for utf8 from unicode case insensitive;
20+
create domain dm_test varchar(2) character set utf8 collate name_coll;
21+
22+
create table t0 (c0 dm_test unique);
23+
insert into t0 (c0) values ( './');
24+
select * from t0 where c0 like './';
25+
"""
26+
27+
act = isql_act('db', test_script, substitutions=[('[ \t]+', ' ')])
28+
29+
@pytest.mark.version('>=3.0')
30+
def test_1(act: Action):
31+
act.expected_stdout = """
32+
C0 ./
33+
"""
34+
act.execute(combine_output = True)
35+
assert act.clean_stdout == act.clean_expected_stdout

0 commit comments

Comments
 (0)