[Bps-public-commit] r11094 - Shipwright/trunk/t

sunnavy at bestpractical.com sunnavy at bestpractical.com
Tue Mar 18 07:05:45 EDT 2008


Author: sunnavy
Date: Tue Mar 18 07:05:45 2008
New Revision: 11094

Added:
   Shipwright/trunk/t/20.util.t

Log:
added 20.util.t

Added: Shipwright/trunk/t/20.util.t
==============================================================================
--- (empty file)
+++ Shipwright/trunk/t/20.util.t	Tue Mar 18 07:05:45 2008
@@ -0,0 +1,31 @@
+use strict;
+use warnings;
+
+use Test::More tests => 2;
+
+use Shipwright::Util;
+use File::Spec;
+use Cwd;
+
+my $cwd = getcwd;
+my ( $shipwright_root, $share_root );
+
+if ( grep { m{blib/lib} } @INC ) {
+
+    # found blib/lib, so we're probably in `make test` or something like that.
+    $shipwright_root = File::Spec->catfile( $cwd, 'blib', 'lib' );
+    $share_root =
+      File::Spec->catfile( $cwd, 'blib', 'lib', 'auto', 'Shipwright' );
+}
+else {
+    $shipwright_root = File::Spec->catfile( $cwd, 'lib' );
+    $share_root      = File::Spec->catfile( $cwd, 'share' );
+}
+
+is(
+    $shipwright_root,
+    Shipwright::Util->shipwright_root,
+    'shipwright_root works',
+);
+is( $share_root, Shipwright::Util->share_root, 'share_root works' );
+



More information about the Bps-public-commit mailing list