aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/test
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2021-12-20 14:15:52 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2021-12-20 14:15:52 -0500
commitdc9c3b0ff21465fa89d71eecf5e6cc956d647eca (patch)
tree3c6f695eb5159d9673d3ce749d7a1499ca779c18 /src/interfaces/ecpg/test
parentd1029bb5a26cb84b116b0dee4dde312291359f2a (diff)
downloadpostgresql-dc9c3b0ff21465fa89d71eecf5e6cc956d647eca.tar.gz
postgresql-dc9c3b0ff21465fa89d71eecf5e6cc956d647eca.zip
Remove dynamic translation of regression test scripts, step 2.
"git mv" all the input/*.source and output/*.source files into the corresponding sql/ and expected/ directories. Then remove the pg_regress and Makefile infrastructure associated with dynamic translation. Discussion: https://postgr.es/m/1655733.1639871614@sss.pgh.pa.us
Diffstat (limited to 'src/interfaces/ecpg/test')
-rw-r--r--src/interfaces/ecpg/test/pg_regress_ecpg.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/interfaces/ecpg/test/pg_regress_ecpg.c b/src/interfaces/ecpg/test/pg_regress_ecpg.c
index 15f588a8023..9465ba7845a 100644
--- a/src/interfaces/ecpg/test/pg_regress_ecpg.c
+++ b/src/interfaces/ecpg/test/pg_regress_ecpg.c
@@ -166,9 +166,14 @@ ecpg_start_test(const char *testname,
snprintf(inprg, sizeof(inprg), "%s/%s", inputdir, testname);
snprintf(insource, sizeof(insource), "%s.c", testname);
+ /* make a version of the test name that has dashes in place of slashes */
initStringInfo(&testname_dash);
appendStringInfoString(&testname_dash, testname);
- replace_string(&testname_dash, "/", "-");
+ for (char *c = testname_dash.data; *c != '\0'; c++)
+ {
+ if (*c == '/')
+ *c = '-';
+ }
snprintf(expectfile_stdout, sizeof(expectfile_stdout),
"%s/expected/%s.stdout",