[svn:parrot] r39801 - in trunk: config/auto t/steps
rblasch at svn.parrot.org
rblasch at svn.parrot.org
Fri Jun 26 14:13:27 UTC 2009
Author: rblasch
Date: Fri Jun 26 14:13:26 2009
New Revision: 39801
URL: https://trac.parrot.org/parrot/changeset/39801
Log:
[config] Quote ICU include path if it contains spaces.
Modified:
trunk/config/auto/icu.pm
trunk/t/steps/auto_icu-01.t
Modified: trunk/config/auto/icu.pm
==============================================================================
--- trunk/config/auto/icu.pm Fri Jun 26 14:11:12 2009 (r39800)
+++ trunk/config/auto/icu.pm Fri Jun 26 14:13:26 2009 (r39801)
@@ -394,10 +394,20 @@
}
}
else {
+ my $icuheaders = $arg->{icuheaders};
+
+ my $icuflags;
+ if ($icuheaders =~ /\s/) {
+ $icuflags = "-I \"$arg->{icuheaders}\"";
+ }
+ else {
+ $icuflags = "-I $arg->{icuheaders}";
+ }
+
if ($arg->{verbose}) {
- print "Adding -I $arg->{icuheaders} to ccflags for icu headers.\n";
+ print "Adding $icuflags to ccflags for icu headers.\n";
}
- $conf->data->add( ' ', ccflags => "-I $arg->{icuheaders}" );
+ $conf->data->add( ' ', ccflags => $icuflags );
}
}
Modified: trunk/t/steps/auto_icu-01.t
==============================================================================
--- trunk/t/steps/auto_icu-01.t Fri Jun 26 14:11:12 2009 (r39800)
+++ trunk/t/steps/auto_icu-01.t Fri Jun 26 14:13:26 2009 (r39801)
@@ -403,13 +403,27 @@
\$stderr,
);
- like($stdout, qr/Adding -I $icuheaders to ccflags for icu headers/,
- "Got expected verbose output");
+ if ($icuheaders =~ /\s/) {
+ like($stdout, qr/Adding -I \"\Q$icuheaders\E\" to ccflags for icu headers/,
+ "Got expected verbose output");
+ }
+ else {
+ like($stdout, qr/Adding -I \Q$icuheaders\E to ccflags for icu headers/,
+ "Got expected verbose output");
+ }
+}
+if ($icuheaders =~ /\s/) {
+ like($conf->data->get( 'ccflags' ),
+ qr/-I \"\Q$icuheaders\E\"/,
+ "ccflags augmented as expected"
+ );
+}
+else {
+ like($conf->data->get( 'ccflags' ),
+ qr/-I \Q$icuheaders\E/,
+ "ccflags augmented as expected"
+ );
}
-like($conf->data->get( 'ccflags'),
- qr/-I $icuheaders/,
- "ccflags augmented as expected"
-);
$conf->data->set( ccflags => $status ); # re-set for next test
{
@@ -430,10 +444,19 @@
ok(! $stdout, "No verbose output, as expected");
}
-like($conf->data->get( 'ccflags'),
- qr/-I $icuheaders/,
- "ccflags augmented as expected"
-);
+
+if ($icuheaders =~ /\s/) {
+ like($conf->data->get( 'ccflags'),
+ qr/-I \"\Q$icuheaders\E\"/,
+ "ccflags augmented as expected"
+ );
+}
+else {
+ like($conf->data->get( 'ccflags'),
+ qr/-I \Q$icuheaders\E/,
+ "ccflags augmented as expected"
+ );
+}
$conf->data->set( ccflags => $status ); # re-set for next test
########## _set_no_configure_with_icu() ##########
@@ -652,7 +675,7 @@
"Got expected verbose output re --ldflags");
like($stdout, qr/icushared: captured/s,
"Got expected verbose output re icushared");
- like($stdout, qr/For icushared, found $icushared and $without/s,
+ like($stdout, qr/For icushared, found \Q$icushared\E and $without/s,
"Got expected verbose output re icushared");
like($stdout, qr/Trying $icuconfig with '--prefix'/s,
"Got expected verbose output re --prefix");
More information about the parrot-commits
mailing list