8000 Added/Updated tests\bugs\core_3491_test.py: Removed 'SHOW' command. I… · FirebirdSQL/firebird-qa@e9b662b · GitHub
[go: up one dir, main page]

Skip to content

Commit e9b662b

Browse files
committed
Added/Updated tests\bugs\core_3491_test.py: Removed 'SHOW' command. It is enough to check twise results of query to rdb$ tables - they must be same. Checked on 6.0.0.876; 5.0.3.1668; 4.0.6.3214; 3.0.13.33813.
1 parent 5257764 commit e9b662b

File tree

1 file changed

+49
-28
lines changed

1 file changed

+49
-28
lines changed

tests/bugs/core_3491_test.py

Lines changed: 49 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,43 +7,64 @@
77
DESCRIPTION:
88
JIRA: CORE-3491
99
FBTEST: bugs.core_3491
10+
NOTES:
11+
[27.06.2025] pzotov
12+
Removed 'SHOW' command. It is enough to check twise results of query to rdb$ tables - they must be same.
13+
14+
Checked on 6.0.0.876; 5.0.3.1668; 4.0.6.3214; 3.0.13.33813.
1015
"""
1116

1217
import pytest
1318
from firebird.qa import *
1419

15-
init_script = """create table aaa (a integer);
16-
commit;
17-
set term !!;
18-
create or alter procedure bbb
19-
returns (b type of column aaa.a)
20-
as
21-
begin
22-
suspend;
23-
end!!
24-
set term ;!!
25-
commit;
26-
"""
20+
db = db_factory()
21+
22+
test_script = """
23+
set list on;
24+
25+
create view v_info as
26+
select rf.rdb$field_name fld_name, f.rdb$field_type fld_type, f.rdb$field_length fld_length, f.rdb$field_scale fld_scale
27+
from rdb$relation_fields rf
28+
left join rdb$fields f on rf.rdb$field_source = f.rdb$field_name
29+
where rf.rdb$relation_name = upper('test');
2730
28-
db = db_factory(init=init_script)
29-
30-
test_script = """show table aaa;
31-
set term !!;
32-
create or alter procedure bbb
33-
returns (b varchar(10))
34-
as
35-
begin
36-
suspend;
37-
end!!
38-
set term ;!!
39-
commit;
40-
show table aaa;
31+
create table test (f01 integer);
32+
commit;
33+
set term ^;
34+
create or alter procedure sp_test returns (o_result type of column test.f01) as
35+
begin
36+
suspend;
37+
end^
38+
set term ;^
39+
commit;
40+
41+
select 'point-1' as msg, v.* from v_info v;
42+
43+
set term ^;
44+
create or alter procedure sp_test returns (o_result varchar(10)) as
45+
begin
46+
suspend;
47+
end^
48+
set term ;^
49+
commit;
50+
51+
select 'point-2' as msg, v.* from v_info v;
4152
"""
4253

43-
act = isql_act('db', test_script)
54+
act = isql_act('db', test_script, substitutions=[('[ \t]+', ' '), ('Table: .*', '')])
55+
56+
expected_stdout = """
57+
MSG point-1
58+
FLD_NAME F01
59+
FLD_TYPE 8
60+
FLD_LENGTH 4
61+
FLD_SCALE 0
4462
45-
expected_stdout = """A INTEGER Nullable
46-
A INTEGER Nullable
63+
MSG point-2
64+
FLD_NAME F01
65+
FLD_TYPE 8
66+
FLD_LENGTH 4
67+
FLD_SCALE 0
4768
"""
4869

4970
@pytest.mark.version('>=3')

0 commit comments

Comments
 (0)
0