[Bps-public-commit] Prophet branch, master, updated. 50a4ff823c7c1761905e4a44d9f5b4533d0d366f

sunnavy at bestpractical.com sunnavy at bestpractical.com
Tue Aug 11 23:14:09 EDT 2009


The branch, master has been updated
       via  50a4ff823c7c1761905e4a44d9f5b4533d0d366f (commit)
      from  ac4ec58a55a71057a7db1d1d1f03f9991402250a (commit)

Summary of changes:
 t/config.t |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

- Log -----------------------------------------------------------------
commit 50a4ff823c7c1761905e4a44d9f5b4533d0d366f
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Aug 12 11:13:54 2009 +0800

    make t/config.t happy on win

diff --git a/t/config.t b/t/config.t
index 14cb3e6..b01cf1a 100644
--- a/t/config.t
+++ b/t/config.t
@@ -5,8 +5,10 @@ use strict;
 use Prophet::Test tests => 13;
 use File::Copy;
 use File::Temp qw'tempdir';
+use File::Spec;
 
-my $repo = $ENV{'PROPHET_REPO'} = $Prophet::Test::REPO_BASE . '/repo-' . $$;
+my $repo = $ENV{'PROPHET_REPO'} =
+  File::Spec->catdir( $Prophet::Test::REPO_BASE, "repo-$$" );
 
 # since we don't initialize the db for these tests, make the repo dir
 mkdir $ENV{PROPHET_REPO};
@@ -77,12 +79,14 @@ is( scalar @keys, 0, 'no config options are set' );
     # run the cli "config" command
     # make sure it matches with our file
     my $got = run_command('config');
-    my $expect = <<EOF
+    my $expect = <<EOF;
 Configuration:
 
 Config files:
 
-$repo/test_app.conf
+EOF
+    $expect .= File::Spec->catfile( $repo, 'test_app.conf' ) . "\n";
+    $expect .= <<EOF;
 
 Your configuration:
 
@@ -93,6 +97,5 @@ replica.sd.uuid=32b13934-910a-4792-b5ed-c9977b212245
 test.foo=bar
 test.re=rawr
 EOF
-    ;
     is($got, $expect, 'output of config command');
 }

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



More information about the Bps-public-commit mailing list