]> granicus.if.org Git - postgresql/commitdiff
Refix the unaccent regression test on MSVC properly
authorPeter Eisentraut <peter_e@gmx.net>
Tue, 19 Apr 2011 19:52:52 +0000 (22:52 +0300)
committerPeter Eisentraut <peter_e@gmx.net>
Tue, 19 Apr 2011 19:52:52 +0000 (22:52 +0300)
... for some value of "properly".  Instead of overriding REGRESS_OPTS,
set the variables ENCODING and NO_LOCALE, which is more expressive and
allows overriding by the user.  Fix vcregress.pl to handle that.

contrib/unaccent/Makefile
src/tools/msvc/vcregress.pl

index 4ee2c685c8509795554122514b3ffee4143e82b4..f0be62db53fa362aade17e424ef8fc47b77bf6ea 100644 (file)
@@ -9,8 +9,9 @@ DATA_TSEARCH = unaccent.rules
 
 REGRESS = unaccent
 
-# Adjust REGRESS_OPTS because we need a UTF8 database
-REGRESS_OPTS = --dbname=$(CONTRIB_TESTDB) --encoding=UTF8 --no-locale
+# We need a UTF8 database
+ENCODING = UTF8
+NO_LOCALE = 1
 
 ifdef USE_PGXS
 PG_CONFIG = pg_config
index 8a100bf2eadeaaadf9357dcec91bdf1ee5468769..8c920b883a9622372c4d203e0aff3a5e916e3402 100644 (file)
@@ -228,6 +228,14 @@ sub fetchRegressOpts
         # ignore anything that isn't an option staring with --
         @opts = grep { $_ !~ /\$\(/ && $_ =~ /^--/ } split(/\s+/,$1);
     }
+    if ($m =~ /^\s*ENCODING\s*=\s*(\S+)/m)
+    {
+        push @opts, "--encoding=$1";
+    }
+    if ($m =~ /^\s*NO_LOCALE\s*=\s*\S+/m)
+    {
+        push @opts, "--no-locale";
+    }
     return @opts;
 }