Skip to content

Commit 831d9f4

Browse files
committed
Added/Updated tests\bugs\gh_7729_test.py: Checked on 5.0.0.1177 (intermediate snapshot). NB: currently FB 4.x seems still having problem. There is no appropriate commit in v4.0-release.
1 parent ece9b7b commit 831d9f4

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

tests/bugs/gh_7729_test.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#coding:utf-8
2+
3+
"""
4+
ID: issue-7729
5+
ISSUE: https://github.com/FirebirdSQL/firebird/issues/7729
6+
TITLE: "SET BIND OF TS WITH TZ TO VARCHAR(128)" uses the date format of dialect 1
7+
DESCRIPTION:
8+
NOTES:
9+
[25.08.2023] pzotov
10+
Confirmed problem on 5.0.0.1169
11+
Checked on 5.0.0.1177 (intermediate snapshot).
12+
::: NB :::
13+
Currently FB 4.x seems still having problem. There is no appropriate commit in v4.0-release.
14+
Test min_version for now is 5.0.
15+
"""
16+
17+
import pytest
18+
from firebird.qa import *
19+
20+
db = db_factory()
21+
22+
CHK_TIMESTAMP = '2023-08-29 01:02:03.0123 +03:00'
23+
test_script = f"""
24+
set heading off;
25+
SET BIND OF TIMESTAMP WITH TIME ZONE TO varchar(128);
26+
select timestamp '{CHK_TIMESTAMP}' dts from rdb$database;
27+
"""
28+
29+
act = isql_act('db', test_script)
30+
31+
expected_stdout = f"""
32+
{CHK_TIMESTAMP}
33+
"""
34+
35+
@pytest.mark.version('>=5.0')
36+
def test_1(act: Action):
37+
act.expected_stdout = expected_stdout
38+
act.execute(combine_output = True)
39+
assert act.clean_stdout == act.clean_expected_stdout

0 commit comments

Comments
 (0)