summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2015-08-10 10:42:05 -0400
committerAndrew Dunstan <andrew@dunslane.net>2015-08-10 10:42:05 -0400
commite7293e3271bf618eeb2d4779a15fc516a69fe463 (patch)
tree3b32211d623af788b4fe23dfe8940a9caee7a51e
parent6a1e14c62b739a754335c088474e12f42a6763bd (diff)
Work around an apparent bug in the Msys DTK perl's regex engine.
Several versions of the perl that comes with the Msys DTK have been found to have a bug that fails to recognize a ' before a multiline $ in some circumstances. To work around the problem, use a character class for the '. Another solution would have been to use \n instead of $, but that would have changed the test semantics very slightly.
-rw-r--r--src/bin/pg_basebackup/t/010_pg_basebackup.pl4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bin/pg_basebackup/t/010_pg_basebackup.pl b/src/bin/pg_basebackup/t/010_pg_basebackup.pl
index 5fa0caa3053..dc96bbf2067 100644
--- a/src/bin/pg_basebackup/t/010_pg_basebackup.pl
+++ b/src/bin/pg_basebackup/t/010_pg_basebackup.pl
@@ -153,7 +153,9 @@ command_ok([ 'pg_basebackup', '-D', "$tempdir/backupR", '-R' ],
'pg_basebackup -R runs');
ok(-f "$tempdir/backupR/recovery.conf", 'recovery.conf was created');
my $recovery_conf = slurp_file "$tempdir/backupR/recovery.conf";
-like($recovery_conf, qr/^standby_mode = 'on'$/m, 'recovery.conf sets standby_mode');
+# using a character class for the final "'" here works around an apparent
+# bug in several version of the Msys DTK perl
+like($recovery_conf, qr/^standby_mode = 'on[']$/m, 'recovery.conf sets standby_mode');
like($recovery_conf, qr/^primary_conninfo = '.*port=$ENV{PGPORT}.*'$/m, 'recovery.conf sets primary_conninfo');
command_ok([ 'pg_basebackup', '-D', "$tempdir/backupxf", '-X', 'fetch' ],