Skip to content

Commit e554b12

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

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#coding:utf-8
2+
3+
"""
4+
ID: n/a
5+
ISSUE: https://dl.acm.org/doi/pdf/10.1145/3428279
6+
TITLE: Comparison of string and numeric literals
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 18
12+
NOTES:
13+
[02.06.2025] pzotov
14+
This test issues only ONE row ('C0 -1') which differs from expected result shown in the source.
15+
Sent report to dimitr et al.
16+
"""
17+
18+
import pytest
19+
from firebird.qa import *
20+
21+
db = db_factory()
22+
23+
test_script = """
24+
set bail on;
25+
set list on;
26+
recreate table t0 (c0 varchar(2) unique);
27+
insert into t0 values (-1);
28+
insert into t0 values (-2);
29+
select * from t0 where c0 >= -1;
30+
"""
31+
32+
act = isql_act('db', test_script, substitutions=[('[ \t]+', ' ')])
33+
34+
@pytest.mark.version('>=3.0')
35+
def test_1(act: Action):
36+
act.expected_stdout = """
37+
C0 -1
38+
"""
39+
act.execute(combine_output = True)
40+
assert act.clean_stdout == act.clean_expected_stdout

0 commit comments

Comments
 (0)