From b6b533dae351f8d142d185543887feda4045245a Mon Sep 17 00:00:00 2001 From: pavel-zotov Date: Sat, 5 Aug 2023 09:14:28 +0300 Subject: [PATCH] Added/Updated tests\bugs\gh_7698_test.py: Checked on 5.0.0.1155 -- all OK. --- tests/bugs/gh_7698_test.py | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 tests/bugs/gh_7698_test.py diff --git a/tests/bugs/gh_7698_test.py b/tests/bugs/gh_7698_test.py new file mode 100644 index 00000000..65e73943 --- /dev/null +++ b/tests/bugs/gh_7698_test.py @@ -0,0 +1,34 @@ +#coding:utf-8 + +""" +ID: issue-7698 +ISSUE: https://github.com/FirebirdSQL/firebird/issues/7698 +TITLE: The legacy plan with window functions is broken +DESCRIPTION: +NOTES: + Confirmed bug on 5.0.0.1149 + Checked on 5.0.0.1155 -- all OK. +""" + +import pytest +from firebird.qa import * + +db = db_factory() + +test_script = f""" + set plan on; + set planonly; + select count(*) over() from rdb$relations; +""" + +act = isql_act('db', test_script) + +expected_stdout = """ + PLAN (RDB$RELATIONS NATURAL) +""" + +@pytest.mark.version('>=3.0') +def test_1(act: Action): + act.expected_stdout = expected_stdout + act.execute(combine_output = True) + assert act.clean_stdout == act.clean_expected_stdout