subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1292762 - /subversion/trunk/subversion/bindings/swig/perl/native/t/3client.t
Date Thu, 23 Feb 2012 12:19:32 GMT
Author: rhuijben
Date: Thu Feb 23 12:19:31 2012
New Revision: 1292762

URL: http://svn.apache.org/viewvc?rev=1292762&view=rev
Log:
* subversion/bindings/swig/perl/native/t/3client.t
  Implement a simple pre-revprop-change hook for Windows in an attempt to fix
  one more perl test.

Modified:
    subversion/trunk/subversion/bindings/swig/perl/native/t/3client.t

Modified: subversion/trunk/subversion/bindings/swig/perl/native/t/3client.t
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/swig/perl/native/t/3client.t?rev=1292762&r1=1292761&r2=1292762&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/swig/perl/native/t/3client.t (original)
+++ subversion/trunk/subversion/bindings/swig/perl/native/t/3client.t Thu Feb 23 12:19:31
2012
@@ -91,36 +91,31 @@ my ($rpgval,$rpgrev) = $ctx->revprop_get
 is($rpgval,$username,'svn:author set to expected username from revprop_get');
 is($rpgrev,$current_rev,'Returned revnum of current rev from revprop_get');
 
-SKIP: {
-    skip 'Difficult to test on Win32', 3 if $^O eq 'MSWin32';
-
+if ($^O eq 'MSWin32') {
+    ok(open(NEW, ">$repospath/hooks/pre-revprop-change.bat"),
+       'Open pre-revprop-change hook for writing');
+    ok(print(NEW 'exit 0'), 'Print to hook');
+    ok(close(NEW),'Close hook');
+} else {
     ok(rename("$repospath/hooks/pre-revprop-change.tmpl",
               "$repospath/hooks/pre-revprop-change"),
        'Rename pre-revprop-change hook');
     ok(chmod(0700,"$repospath/hooks/pre-revprop-change"),
        'Change permissions on pre-revprop-change hook');
-
-    my ($rps_rev) = $ctx->revprop_set('svn:log','mkdir dir1',
-                                      $reposurl, $current_rev, 0);
-    is($rps_rev,$current_rev,
-       'Returned revnum of current rev from revprop_set');
-
 }
+my ($rps_rev) = $ctx->revprop_set('svn:log','mkdir dir1',
+                                  $reposurl, $current_rev, 0);
+is($rps_rev,$current_rev,
+   'Returned revnum of current rev from revprop_set');
 
 my ($rph, $rplrev) = $ctx->revprop_list($reposurl,$current_rev);
 isa_ok($rph,'HASH','Returned hash reference form revprop_list');
 is($rplrev,$current_rev,'Returned current rev from revprop_list');
 is($rph->{'svn:author'},$username,
    'svn:author is expected user from revprop_list');
-if ($^O eq 'MSWin32') {
-    # we skip the log change test on win32 so we have to test
-    # for a different var here
-    is($rph->{'svn:log'},'Make dir1',
-       'svn:log is expected value from revprop_list');
-} else {
-    is($rph->{'svn:log'},'mkdir dir1',
-       'svn:log is expected value from revprop_list');
-}
+is($rph->{'svn:log'},'mkdir dir1',
+   'svn:log is expected value from revprop_list');
+
 ok($rph->{'svn:date'},'svn:date is set from revprop_list');
 
 is($ctx->checkout($reposurl,$wcpath,'HEAD',1),$current_rev,



Mime
View raw message