diff --git a/tests/bugs/core_4318_test.py b/tests/bugs/core_4318_test.py index 66bf6d05..bac53dce 100644 --- a/tests/bugs/core_4318_test.py +++ b/tests/bugs/core_4318_test.py @@ -60,17 +60,13 @@ test_script = """ set planonly; set term ^; - execute block - returns ( - s integer - ) - as - declare variable v integer = 1; + execute block returns (s integer) as + declare v integer = 1; begin with t as ( - select t1_id as t1_id, sum(id) as s - from t2 - group by 1 + select t1_id as t1_id, sum(id) as s -- FB 5.x: "Select Expression (line NNN, column MMM)" + from t2 + group by 1 ) select s from t @@ -91,9 +87,9 @@ test_script = """ -- (i.e. there was NO "Filter" between "Aggregate" and "Table "T T2" Access By ID") """ -act = isql_act('db', test_script) +act = isql_act('db', test_script, substitutions = [('line \\d+, col(umn)? \\d+', 'line, col')]) -expected_stdout = """ +fb3x_expected_out = """ Select Expression -> Singularity Check -> Filter @@ -103,9 +99,20 @@ expected_stdout = """ -> Index "FK_T2_REF_T1" Range Scan (full match) """ +fb5x_expected_out = """ + Select Expression (line 8, column 7) + -> Singularity Check + -> Filter + -> Aggregate + -> Filter + -> Table "T2" as "T T2" Access By ID + -> Index "FK_T2_REF_T1" Range Scan (full match) +""" + @pytest.mark.version('>=3.0') def test_1(act: Action): - act.expected_stdout = expected_stdout + act.expected_stdout = fb3x_expected_out if act.is_version('<5') else fb5x_expected_out act.execute() + #assert act.stdout == act.clean_expected_stdout assert act.clean_stdout == act.clean_expected_stdout