From d59b45edf66ccefd60bffebcf182dca3cb521d79 Mon Sep 17 00:00:00 2001 From: pavel-zotov Date: Mon, 27 Nov 2023 22:20:49 +0300 Subject: [PATCH] Added/Updated tests\bugs\gh_7879_test.py: Checked 6.0.0.154, 5.0.0.1280 --- tests/bugs/gh_7879_test.py | 43 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 tests/bugs/gh_7879_test.py diff --git a/tests/bugs/gh_7879_test.py b/tests/bugs/gh_7879_test.py new file mode 100644 index 00000000..b10f2d1f --- /dev/null +++ b/tests/bugs/gh_7879_test.py @@ -0,0 +1,43 @@ +#coding:utf-8 + +""" +ID: issue-7879 +ISSUE: 7879 +TITLE: Unexpected Results when Using Natural Right Join +DESCRIPTION: +NOTES: + [27.11.2023] pzotov + Checked 6.0.0.154, 5.0.0.1280 +""" + +import pytest +from firebird.qa import * + +db = db_factory() + +test_script = """ + recreate table t0(c0 int, c1 int); + recreate table t1(c0 int); + + insert into t0(c0, c1) values (1, 2); + insert into t1( c0) values (3); + + set list on; + set count on; + + select * from t0 natural right join t1 where ((c0 in (c0, c1))); +""" + +act = isql_act('db', test_script) + +expected_stdout = """ + C0 3 + C1 + Records affected: 1 +""" + +@pytest.mark.version('>=5.0') +def test_1(act: Action): + act.expected_stdout = expected_stdout + act.execute(combine_output = True) + assert act.clean_stdout == act.clean_expected_stdout