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

Commit0432490

Browse files
Rename libpq test programs with libpq_ prefix
The testclient and uri-regress programs in the libpq test suite hadquite generic names which didn't convey much meaning. Since they areinstalled as part of the MSVC test runs, ensure that their purposeis a little bit clearer by renaming with a libpq_ prefix. While atit rename uri-regress to uri_regress to avoid mixing dash and under-score in the same filename.Reported-by: Noah Misch <noah@leadboat.com>Discussion:https://postgr.es/m/20220501080706.GA1542365@rfd.leadboat.com
1 parent2e77180 commit0432490

File tree

7 files changed

+29
-29
lines changed

7 files changed

+29
-29
lines changed

‎src/interfaces/libpq/t/001_uri.pl

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
],
7373
[
7474
q{postgresql://host/db?u%7aer=someotheruser&port=12345},q{},
75-
q{uri-regress: invalid URI query parameter: "uzer"},
75+
q{libpq_uri_regress: invalid URI query parameter: "uzer"},
7676
],
7777
[
7878
q{postgresql://host:12345?user=uri-user},
@@ -114,63 +114,63 @@
114114
],
115115
[
116116
q{postgresql://host?uzer=},q{},
117-
q{uri-regress: invalid URI query parameter: "uzer"},
117+
q{libpq_uri_regress: invalid URI query parameter: "uzer"},
118118
],
119119
[
120120
q{postgre://},
121121
q{},
122-
q{uri-regress: missing "=" after "postgre://" in connection info string},
122+
q{libpq_uri_regress: missing "=" after "postgre://" in connection info string},
123123
],
124124
[
125125
q{postgres://[::1},
126126
q{},
127-
q{uri-regress: end of string reached when looking for matching "]" in IPv6 host address in URI: "postgres://[::1"},
127+
q{libpq_uri_regress: end of string reached when looking for matching "]" in IPv6 host address in URI: "postgres://[::1"},
128128
],
129129
[
130130
q{postgres://[]},
131131
q{},
132-
q{uri-regress: IPv6 host address may not be empty in URI: "postgres://[]"},
132+
q{libpq_uri_regress: IPv6 host address may not be empty in URI: "postgres://[]"},
133133
],
134134
[
135135
q{postgres://[::1]z},
136136
q{},
137-
q{uri-regress: unexpected character "z" at position 17 in URI (expected ":" or "/"): "postgres://[::1]z"},
137+
q{libpq_uri_regress: unexpected character "z" at position 17 in URI (expected ":" or "/"): "postgres://[::1]z"},
138138
],
139139
[
140140
q{postgresql://host?zzz},
141141
q{},
142-
q{uri-regress: missing key/value separator "=" in URI query parameter: "zzz"},
142+
q{libpq_uri_regress: missing key/value separator "=" in URI query parameter: "zzz"},
143143
],
144144
[
145145
q{postgresql://host?value1&value2},
146146
q{},
147-
q{uri-regress: missing key/value separator "=" in URI query parameter: "value1"},
147+
q{libpq_uri_regress: missing key/value separator "=" in URI query parameter: "value1"},
148148
],
149149
[
150150
q{postgresql://host?key=key=value},
151151
q{},
152-
q{uri-regress: extra key/value separator "=" in URI query parameter: "key"},
152+
q{libpq_uri_regress: extra key/value separator "=" in URI query parameter: "key"},
153153
],
154154
[
155155
q{postgres://host?dbname=%XXfoo},q{},
156-
q{uri-regress: invalid percent-encoded token: "%XXfoo"},
156+
q{libpq_uri_regress: invalid percent-encoded token: "%XXfoo"},
157157
],
158158
[
159159
q{postgresql://a%00b},
160160
q{},
161-
q{uri-regress: forbidden value %00 in percent-encoded value: "a%00b"},
161+
q{libpq_uri_regress: forbidden value %00 in percent-encoded value: "a%00b"},
162162
],
163163
[
164164
q{postgresql://%zz},q{},
165-
q{uri-regress: invalid percent-encoded token: "%zz"},
165+
q{libpq_uri_regress: invalid percent-encoded token: "%zz"},
166166
],
167167
[
168168
q{postgresql://%1},q{},
169-
q{uri-regress: invalid percent-encoded token: "%1"},
169+
q{libpq_uri_regress: invalid percent-encoded token: "%1"},
170170
],
171171
[
172172
q{postgresql://%},q{},
173-
q{uri-regress: invalid percent-encoded token: "%"},
173+
q{libpq_uri_regress: invalid percent-encoded token: "%"},
174174
],
175175
[q{postgres://@host},q{host='host' (inet)},q{}, ],
176176
[q{postgres://host:/},q{host='host' (inet)},q{}, ],
@@ -224,7 +224,7 @@ sub test_uri
224224

225225
$expect{'exit'} =$expect{stderr}eq'';
226226

227-
my$cmd = ['uri-regress',$uri ];
227+
my$cmd = ['libpq_uri_regress',$uri ];
228228
$result{exit} = IPC::Run::run$cmd,'>', \$result{stdout},'2>',
229229
\$result{stderr};
230230

‎src/interfaces/libpq/t/002_api.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Test::More;
77

88
# Test PQsslAttribute(NULL, "library")
9-
my ($out,$err) = run_command(['testclient','--ssl']);
9+
my ($out,$err) = run_command(['libpq_testclient','--ssl']);
1010

1111
if ($ENV{with_ssl}eq'openssl')
1212
{

‎src/interfaces/libpq/test/.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
/testclient
2-
/uri-regress
1+
/libpq_testclient
2+
/libpq_uri_regress

‎src/interfaces/libpq/test/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ endif
1111
overrideCPPFLAGS := -I$(libpq_srcdir)$(CPPFLAGS)
1212
LDFLAGS_INTERNAL +=$(libpq_pgport)
1313

14-
PROGS =testclient uri-regress
14+
PROGS =libpq_testclient libpq_uri_regress
1515

1616
all:$(PROGS)
1717

‎src/interfaces/libpq/test/testclient.crenamed to‎src/interfaces/libpq/test/libpq_testclient.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
2-
*testclient.c
2+
*libpq_testclient.c
33
*A test program for the libpq public API
44
*
55
* Copyright (c) 2022, PostgreSQL Global Development Group
66
*
77
* IDENTIFICATION
8-
*src/interfaces/libpq/test/testclient.c
8+
*src/interfaces/libpq/test/libpq_testclient.c
99
*/
1010

1111
#include"postgres_fe.h"

‎src/interfaces/libpq/test/uri-regress.crenamed to‎src/interfaces/libpq/test/libpq_uri_regress.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
*uri-regress.c
2+
*libpq_uri_regress.c
33
*A test program for libpq URI format
44
*
55
* This is a helper for libpq conninfo regression testing. It takes a single
@@ -10,7 +10,7 @@
1010
* Portions Copyright (c) 2012-2022, PostgreSQL Global Development Group
1111
*
1212
* IDENTIFICATION
13-
*src/interfaces/libpq/test/uri-regress.c
13+
*src/interfaces/libpq/test/libpq_uri_regress.c
1414
*/
1515

1616
#include"postgres_fe.h"
@@ -33,14 +33,14 @@ main(int argc, char *argv[])
3333
opts=PQconninfoParse(argv[1],&errmsg);
3434
if (opts==NULL)
3535
{
36-
fprintf(stderr,"uri-regress: %s",errmsg);
36+
fprintf(stderr,"libpq_uri_regress: %s",errmsg);
3737
return1;
3838
}
3939

4040
defs=PQconndefaults();
4141
if (defs==NULL)
4242
{
43-
fprintf(stderr,"uri-regress: cannot fetch default options\n");
43+
fprintf(stderr,"libpq_uri_regress: cannot fetch default options\n");
4444
return1;
4545
}
4646

‎src/tools/msvc/Mkvcbuild.pm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -285,17 +285,17 @@ sub mkvcbuild
285285
$libpqwalreceiver->AddReference($postgres,$libpq);
286286

287287
my$libpq_testclient =
288-
$solution->AddProject('testclient','exe','misc',
288+
$solution->AddProject('libpq_testclient','exe','misc',
289289
'src/interfaces/libpq/test');
290-
$libpq_testclient->AddFile('src/interfaces/libpq/test/testclient.c');
290+
$libpq_testclient->AddFile('src/interfaces/libpq/test/libpq_testclient.c');
291291
$libpq_testclient->AddIncludeDir('src/interfaces/libpq');
292292
$libpq_testclient->AddReference($libpgport,$libpq);
293293
$libpq_testclient->AddLibrary('ws2_32.lib');
294294

295295
my$libpq_uri_regress =
296-
$solution->AddProject('uri-regress','exe','misc',
296+
$solution->AddProject('libpq_uri_regress','exe','misc',
297297
'src/interfaces/libpq/test');
298-
$libpq_uri_regress->AddFile('src/interfaces/libpq/test/uri-regress.c');
298+
$libpq_uri_regress->AddFile('src/interfaces/libpq/test/libpq_uri_regress.c');
299299
$libpq_uri_regress->AddIncludeDir('src/interfaces/libpq');
300300
$libpq_uri_regress->AddReference($libpgport,$libpq);
301301
$libpq_uri_regress->AddLibrary('ws2_32.lib');

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp