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

Commitca899d9

Browse files
committed
Fix portability issue in TAP tests of psql for locales
Some locales use a comma as decimal separator (like Czech or French),and psql's 001_basic.pl for \timing was not able to handle thatproperly. This fixes the matching regexes to be able to handle bothcomma and dot as possible decimal separators, as per a suggestion fromAndrew Dunstan.psql tests were the only place with such a portability issue(check-world passed here with a forced LANG/LANGUAGE). These tests arenew as ofc0280bc, so there is no need for a backpatch.Reported-by: Pavel StehuleDiscussion:https://postgr.es/m/CAFj8pRBz8iQmd2aOaCLvO-rJY6vZr-h6Q0qvV0J+yb78J7uiaA@mail.gmail.com
1 parent4fff78f commitca899d9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/bin/psql/t/001_basic.pl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,15 @@ sub psql_fails_like
8585
'\timing on
8686
SELECT 1',
8787
qr/^1$
88-
^Time:\d+\.\d\d\d ms/m,
88+
^Time:\d+[.,]\d\d\d ms/m,
8989
'\timing with successful query');
9090

9191
# test \timing with query that fails
9292
{
9393
my ($ret,$stdout,$stderr) =$node->psql('postgres',"\\timing on\nSELECT error");
9494
isnt($ret, 0,'\timing with query error: query failed');
95-
like($stdout,qr/^Time:\d+\.\d\d\d ms/m,'\timing with query error: timing output appears');
96-
unlike($stdout,qr/^Time: 0\.000 ms/m,'\timing with query error: timing was updated');
95+
like($stdout,qr/^Time:\d+[.,]\d\d\d ms/m,'\timing with query error: timing output appears');
96+
unlike($stdout,qr/^Time: 0[.,]000 ms/m,'\timing with query error: timing was updated');
9797
}
9898

9999
# test that ENCODING variable is set and that it is updated when

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp