From 385942f46ce526000d231c51c76360a807c2f809 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 19 Apr 2011 22:52:52 +0300 Subject: [PATCH] Refix the unaccent regression test on MSVC properly ... 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 | 5 +++-- src/tools/msvc/vcregress.pl | 8 ++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/contrib/unaccent/Makefile b/contrib/unaccent/Makefile index 4ee2c685c8..f0be62db53 100644 --- a/contrib/unaccent/Makefile +++ b/contrib/unaccent/Makefile @@ -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 diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl index 8a100bf2ea..8c920b883a 100644 --- a/src/tools/msvc/vcregress.pl +++ b/src/tools/msvc/vcregress.pl @@ -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; } -- GitLab