Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 385942f

Browse files
committed
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.
1 parent 2e8d954 commit 385942f

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

contrib/unaccent/Makefile

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ DATA_TSEARCH = unaccent.rules
99

1010
REGRESS = unaccent
1111

12-
# Adjust REGRESS_OPTS because we need a UTF8 database
13-
REGRESS_OPTS = --dbname=$(CONTRIB_TESTDB) --encoding=UTF8 --no-locale
12+
# We need a UTF8 database
13+
ENCODING = UTF8
14+
NO_LOCALE = 1
1415

1516
ifdef USE_PGXS
1617
PG_CONFIG = pg_config

src/tools/msvc/vcregress.pl

+8
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,14 @@ sub fetchRegressOpts
228228
# ignore anything that isn't an option staring with --
229229
@opts = grep { $_ !~ /\$\(/ && $_ =~ /^--/ } split(/\s+/,$1);
230230
}
231+
if ($m =~ /^\s*ENCODING\s*=\s*(\S+)/m)
232+
{
233+
push @opts, "--encoding=$1";
234+
}
235+
if ($m =~ /^\s*NO_LOCALE\s*=\s*\S+/m)
236+
{
237+
push @opts, "--no-locale";
238+
}
231239
return @opts;
232240
}
233241

0 commit comments

Comments
 (0)