[Bps-public-commit] Config-GitLike branch, master, updated. 1.00-22-gf7c3ce7

sunnavy at bestpractical.com sunnavy at bestpractical.com
Tue Aug 18 22:40:37 EDT 2009


The branch, master has been updated
       via  f7c3ce74ce51643c8deb0d3cb83b56f534381792 (commit)
      from  1f4bbbf15e3ca7e748b56fd1eba2070eb5e40596 (commit)

Summary of changes:
 t/t1300-repo-config.t |   56 ++++++++++++++++++++++++++----------------------
 1 files changed, 30 insertions(+), 26 deletions(-)

- Log -----------------------------------------------------------------
commit f7c3ce74ce51643c8deb0d3cb83b56f534381792
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Aug 19 10:40:11 2009 +0800

    skip symlink tests for win

diff --git a/t/t1300-repo-config.t b/t/t1300-repo-config.t
index e323b86..1d79659 100644
--- a/t/t1300-repo-config.t
+++ b/t/t1300-repo-config.t
@@ -1065,33 +1065,38 @@ EOF
 $config->load;
 is( $config->dump, $expect, 'value continued on next line' );
 
+
 # testing symlinked configuration
-symlink File::Spec->catfile( $config_dirname, 'notyet' ),
-    File::Spec->catfile( $config_dirname, 'myconfig' );
+SKIP: {
+    skip 'windows does *not* support symlink', 2 if $^O =~ /MSWin/;
 
-my $myconfig = TestConfig->new(
-    confname => 'myconfig',
-    tmpdir   => $config_dirname
-);
-$myconfig->set(
-    key      => 'test.frotz',
-    value    => 'nitfol',
-    filename => File::Spec->catfile( $config_dirname, 'myconfig' )
-);
-my $notyet = TestConfig->new(
-    confname => 'notyet',
-    tmpdir   => $config_dirname
-);
-$notyet->set(
-    key      => 'test.xyzzy',
-    value    => 'rezrov',
-    filename => File::Spec->catfile( $config_dirname, 'notyet' )
-);
-$notyet->load;
-is( $notyet->get( key => 'test.frotz' ),
-    'nitfol', 'can get 1st val from symlink' );
-is( $notyet->get( key => 'test.xyzzy' ),
-    'rezrov', 'can get 2nd val from symlink' );
+    symlink File::Spec->catfile( $config_dirname, 'notyet' ),
+      File::Spec->catfile( $config_dirname, 'myconfig' );
+
+    my $myconfig = TestConfig->new(
+        confname => 'myconfig',
+        tmpdir   => $config_dirname
+    );
+    $myconfig->set(
+        key      => 'test.frotz',
+        value    => 'nitfol',
+        filename => File::Spec->catfile( $config_dirname, 'myconfig' )
+    );
+    my $notyet = TestConfig->new(
+        confname => 'notyet',
+        tmpdir   => $config_dirname
+    );
+    $notyet->set(
+        key      => 'test.xyzzy',
+        value    => 'rezrov',
+        filename => File::Spec->catfile( $config_dirname, 'notyet' )
+    );
+    $notyet->load;
+    is( $notyet->get( key => 'test.frotz' ),
+        'nitfol', 'can get 1st val from symlink' );
+    is( $notyet->get( key => 'test.xyzzy' ),
+        'rezrov', 'can get 2nd val from symlink' );
+}
 
 ### ADDITIONAL TESTS (not from the git test suite, just things that I didn't
 ### see tests for and think should be tested)
@@ -1214,7 +1219,6 @@ is( $config->get( key => 'section.b' ), 'off',
 
 is( $config->get( key => 'section.a' ), 'off',
     'user config is loaded');
-
 burp(
     $global_config,
     '[section]

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



More information about the Bps-public-commit mailing list