You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2013/02/03 21:52:25 UTC

[lucy-commits] [1/3] git commit: refs/heads/cfc-tests - Fix CFC Perl tests on Windows

Fix CFC Perl tests on Windows


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/6f8f0f6b
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/6f8f0f6b
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/6f8f0f6b

Branch: refs/heads/cfc-tests
Commit: 6f8f0f6bb23ac666ab3f3197f984ec9d2f8e6bc0
Parents: b2f3868
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sun Feb 3 21:34:34 2013 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Sun Feb 3 21:34:34 2013 +0100

----------------------------------------------------------------------
 clownfish/compiler/perl/t/404-file.t        |    6 ++++--
 clownfish/compiler/perl/t/500-hierarchy.t   |    6 +++---
 clownfish/compiler/perl/t/501-include_dir.t |   15 ++++++++-------
 3 files changed, 15 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/6f8f0f6b/clownfish/compiler/perl/t/404-file.t
----------------------------------------------------------------------
diff --git a/clownfish/compiler/perl/t/404-file.t b/clownfish/compiler/perl/t/404-file.t
index 173bafa..07bf09e 100644
--- a/clownfish/compiler/perl/t/404-file.t
+++ b/clownfish/compiler/perl/t/404-file.t
@@ -17,6 +17,7 @@ use strict;
 use warnings;
 
 use Test::More tests => 19;
+use File::Spec::Functions qw( catdir );
 
 use Clownfish::CFC::Model::File;
 use Clownfish::CFC::Parser;
@@ -32,16 +33,17 @@ my $class_content      = qq|
 |;
 my $c_block = "__C__\nint foo;\n__END_C__\n";
 
+my $path_part = catdir(qw( Stuff Thing ));
 my $file_spec = Clownfish::CFC::Model::FileSpec->new(
     source_dir  => '.',
-    path_part   => 'Stuff/Thing',
+    path_part   => $path_part,
 );
 my $file
     = $parser->_parse_file( "$parcel_declaration\n$class_content\n$c_block",
     $file_spec );
 
 is( $file->get_source_dir, ".", "get_source_dir" );
-is( $file->get_path_part, "Stuff/Thing", "get_path_part" );
+is( $file->get_path_part, $path_part, "get_path_part" );
 ok( !$file->included, "included" );
 
 my $guard_name = $file->guard_name;

http://git-wip-us.apache.org/repos/asf/lucy/blob/6f8f0f6b/clownfish/compiler/perl/t/500-hierarchy.t
----------------------------------------------------------------------
diff --git a/clownfish/compiler/perl/t/500-hierarchy.t b/clownfish/compiler/perl/t/500-hierarchy.t
index dcec398..0f7f82e 100644
--- a/clownfish/compiler/perl/t/500-hierarchy.t
+++ b/clownfish/compiler/perl/t/500-hierarchy.t
@@ -20,13 +20,13 @@ use Test::More tests => 20;
 
 use Clownfish::CFC::Model::Hierarchy;
 use Clownfish::CFC::Util qw( a_isa_b );
-use File::Spec::Functions qw( catfile splitpath );
+use File::Spec::Functions qw( catdir catfile splitpath );
 use Fcntl;
 use File::Path qw( rmtree mkpath );
 
-my $source = 't/cfsource';
+my $source = catdir(qw( t cfsource ));
 my %args = (
-    dest   => 't/cfdest',
+    dest => catdir(qw( t cfdest )),
 );
 
 # Clean up.

http://git-wip-us.apache.org/repos/asf/lucy/blob/6f8f0f6b/clownfish/compiler/perl/t/501-include_dir.t
----------------------------------------------------------------------
diff --git a/clownfish/compiler/perl/t/501-include_dir.t b/clownfish/compiler/perl/t/501-include_dir.t
index 6f055b3..202a0ef 100644
--- a/clownfish/compiler/perl/t/501-include_dir.t
+++ b/clownfish/compiler/perl/t/501-include_dir.t
@@ -20,16 +20,16 @@ use Test::More tests => 25;
 
 use Clownfish::CFC::Model::Hierarchy;
 use Clownfish::CFC::Util qw( a_isa_b );
-use File::Spec::Functions qw( catfile splitpath );
+use File::Spec::Functions qw( catdir catfile splitpath );
 use Fcntl;
 use File::Path qw( rmtree );
 
-my $source = 't/cfsource';
-my $ext    = 't/cfext';
-my $dest   = 't/cfdest';
+my $source = catdir(qw( t cfsource ));
+my $ext    = catdir(qw( t cfext ));
+my $dest   = catdir(qw( t cfdest ));
 
-my $class_clash = 't/cfclash/class';
-my $file_clash  = 't/cfclash/file';
+my $class_clash = catdir(qw( t cfclash class ));
+my $file_clash  = catdir(qw( t cfclash file ));
 
 # One source, one include
 
@@ -120,7 +120,8 @@ my $file_clash  = 't/cfclash/file';
 
     eval { $hierarchy->build; };
 
-    like( $@, qr/File Animal\/Dog.cfh already registered/, "source/source filename clash" );
+    my $filename = catfile(qw( Animal Dog.cfh ));
+    like( $@, qr/File \Q$filename\E already registered/, "source/source filename clash" );
 
     Clownfish::CFC::Model::Class->_clear_registry();
 }