[Bps-public-commit] r10383 - bpsbuilder/BPB/t/hello

sunnavy at bestpractical.com sunnavy at bestpractical.com
Thu Jan 17 09:15:18 EST 2008


Author: sunnavy
Date: Thu Jan 17 09:15:11 2008
New Revision: 10383

Modified:
   bpsbuilder/BPB/t/hello/hello.t

Log:
more tests

Modified: bpsbuilder/BPB/t/hello/hello.t
==============================================================================
--- bpsbuilder/BPB/t/hello/hello.t	(original)
+++ bpsbuilder/BPB/t/hello/hello.t	Thu Jan 17 09:15:11 2008
@@ -1,11 +1,12 @@
 use strict;
 use warnings;
 
-use Test::More tests => 27;
+use Test::More tests => 29;
 
 use BPB;
 use File::Temp qw/tempdir/;
 use File::Copy;
+use File::Spec;
 
 
 my %source = (
@@ -46,16 +47,18 @@
     isa_ok( $bpb->$_->log, 'Log::Log4perl::Logger' );
 }
 
-ok( -e File::Spec->catfile( $source_dir, 'lib', 'Acme', 'Hello.pm' ) );
-ok( -e File::Spec->catfile( $source_dir, 'META.yml' ) );
+ok( -e File::Spec->catfile( $source_dir, 'lib', 'Acme', 'Hello.pm' ),
+        'lib/Acme/Hello.pm exists in the source' );
+ok( -e File::Spec->catfile( $source_dir, 'META.yml' ), 'META.yml exists in the source' );
 
 $bpb->backend->initialize( name => 'hello' );
 my @dirs = sort `svk ls //__bpb/hello`;
 chomp @dirs;
-is_deeply( [@dirs], [ 'bin/', 'bpb/', 'dists/', 'etc/', 'scripts/', 't/' ] );
+is_deeply( [@dirs], [ 'bin/', 'bpb/', 'dists/', 'etc/', 'scripts/', 't/' ],
+        'initialize works' );
 
 $bpb->backend->import( name => 'hello', source => $source_dir );
-ok( grep { /Build\.PL/ } `svk ls //__bpb/hello/dists/Acme-Hello`,
+ok( grep( { /Build\.PL/ } `svk ls //__bpb/hello/dists/Acme-Hello`),
     'imported ok' );
 
 my $script_dir = tempdir( CLEANUP => 1 );
@@ -67,5 +70,13 @@
     source       => $source_dir,
     build_script => $script_dir,
 );
-ok( grep { /Build\.PL/ } `svk cat //__bpb/hello/scripts/Acme-Hello/build`, 'build script ok' );
+ok( grep( { /Build\.PL/ } `svk cat //__bpb/hello/scripts/Acme-Hello/build`), 'build script ok' );
+
+$bpb->backend->export( target => $bpb->build->build_base );
+my $install_dir = tempdir;
+$bpb->build->run( install_base => $install_dir ) ;
+ok( -e File::Spec->catfile($install_dir, 'lib', 'perl5', 'Acme', 'Hello.pm')
+        , 'Acme/Hello.pm exists');
+ok( -e File::Spec->catfile($install_dir, 'etc', 'bpb-script-wrapper' ),
+        'etc/bpb-script-wrapper exists' );
 



More information about the Bps-public-commit mailing list