Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit033b969

Browse files
committed
Make sure to run one initdb TAP test with no TZ set
That way we make sure that initdb's time zone setting code is exercised.This doesn't add an extra test, it just alters an existing test.Discussion: <https://postgr.es/m/5807.1492229253@sss.pgh.pa.us>
1 parenta74740f commit033b969

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

‎src/bin/initdb/t/001_initdb.pl

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,16 @@
3434
'role names cannot begin with "pg_"');
3535

3636
mkdir$datadir;
37-
command_ok(['initdb','-N','-T','german','-X',$xlogdir,$datadir ],
38-
'successful creation');
3937

38+
# make sure we run one successful test without a TZ setting so we test
39+
# initdb's time zone setting code
40+
{
41+
# delete local only works from perl 5.12, so use the older way to do this
42+
local (%ENV) =%ENV;
43+
delete$ENV{TZ};
44+
45+
command_ok(['initdb','-N','-T','german','-X',$xlogdir,$datadir ],
46+
'successful creation');
47+
}
4048
command_ok(['initdb','-S',$datadir ],'sync only');
4149
command_fails(['initdb',$datadir ],'existing data directory');

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp