Update of /cvsroot/module-build/Module-Build/t
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16078/t
Modified Files:
metadata.t
Log Message:
Handle some YAML escaping better
Index: metadata.t
===================================================================
RCS file: /cvsroot/module-build/Module-Build/t/metadata.t,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- metadata.t 5 Nov 2005 15:58:13 -0000 1.9
+++ metadata.t 29 Nov 2005 05:03:09 -0000 1.10
@@ -3,7 +3,7 @@
use lib 't/lib';
use strict;
-use Test::More tests => 43;
+use Test::More tests => 46;
use File::Spec ();
@@ -562,6 +562,14 @@
is_deeply($mb->find_dist_packages, {});
+{
+ # Put our YAML escaper through a few tests. This isn't part of the M::B API.
+ my $yq = sub {Module::Build->_yaml_quote_string(@_)};
+ like $yq->(''), qr{^ (['"]) \1 $}x;
+ is $yq->('Foo "bar" baz'), q{'Foo "bar" baz'};
+ is $yq->("Foo 'bar' baz"), q{"Foo 'bar' baz"};
+}
+
############################################################
# cleanup
chdir( $cwd ) or die "Can't chdir to '$cwd': $!";
|