Skip to content

Commit b43a845

Browse files
committed
Added/Updated tests\functional\sqlancer\doi_10_1145_3428279_example_17_test.py: adapted from article provided in SQLancer documentation.
1 parent 35c3642 commit b43a845

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#coding:utf-8
2+
3+
"""
4+
ID: n/a
5+
ISSUE: https://dl.acm.org/doi/pdf/10.1145/3428279
6+
TITLE: Conversion of character string to boolean value
7+
DESCRIPTION:
8+
Manuel Rigger and Zhendong Su
9+
Finding Bugs in Database Systems via Query Partitioning
10+
https://dl.acm.org/doi/pdf/10.1145/3428279
11+
page 23 listing 17
12+
"""
13+
14+
import pytest
15+
from firebird.qa import *
16+
17+
db = db_factory()
18+
19+
test_script = """
20+
set list on;
21+
recreate table t0 (c0 boolean);
22+
insert into t0 values (false);
23+
select * from t0 where not (c0 != 'true' and c0);
24+
"""
25+
26+
act = isql_act('db', test_script, substitutions=[('[ \t]+', ' ')])
27+
28+
@pytest.mark.version('>=4.0')
29+
def test_1(act: Action):
30+
act.expected_stdout = """
31+
C0 <false>
32+
"""
33+
act.execute(combine_output = True)
34+
assert act.clean_stdout == act.clean_expected_stdout

0 commit comments

Comments
 (0)