[Bps-public-commit] Config-GitLike branch, master, updated. 1.00-23-g710eea4

sunnavy at bestpractical.com sunnavy at bestpractical.com
Tue Aug 18 22:50:47 EDT 2009


The branch, master has been updated
       via  710eea409e02ea6574a917fd475630eb849a54cc (commit)
      from  f7c3ce74ce51643c8deb0d3cb83b56f534381792 (commit)

Summary of changes:
 t/lib/TestConfig.pm |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

- Log -----------------------------------------------------------------
commit 710eea409e02ea6574a917fd475630eb849a54cc
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Aug 19 10:50:22 2009 +0800

    don't contain volumn part in user_file, global_file and dir_file for test

diff --git a/t/lib/TestConfig.pm b/t/lib/TestConfig.pm
index 853cb8e..c47009c 100644
--- a/t/lib/TestConfig.pm
+++ b/t/lib/TestConfig.pm
@@ -18,20 +18,24 @@ has 'tmpdir' => (
 
 sub dir_file {
     my $self = shift;
-
-    return File::Spec->catfile($self->tmpdir, $self->confname);
+    my $dirs = (File::Spec->splitpath( $self->tmpdir, 1 ))[1];
+    return File::Spec->catfile($dirs, $self->confname);
 }
 
 sub user_file {
     my $self = shift;
 
-    return File::Spec->catfile($self->tmpdir, 'home', $self->confname);
+    return File::Spec->catfile(
+        ( File::Spec->splitpath( $self->tmpdir, 1 ) )[1],
+        'home', $self->confname );
 }
 
 sub global_file {
     my $self = shift;
 
-    return File::Spec->catfile($self->tmpdir, 'etc', $self->confname);
+    return File::Spec->catfile(
+        ( File::Spec->splitpath( $self->tmpdir, 1 ) )[1],
+        'etc', $self->confname );
 }
 
 __PACKAGE__->meta->make_immutable;

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list