subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bre...@apache.org
Subject svn commit: r1446761 - /subversion/trunk/subversion/bindings/swig/perl/native/t/3client.t
Date Fri, 15 Feb 2013 20:35:39 GMT
Author: breser
Date: Fri Feb 15 20:35:39 2013
New Revision: 1446761

URL: http://svn.apache.org/r1446761
Log:
swig-pl: Add tests for using a _p_svn_opt_revision_t directly.

* subversion/bindings/swig/perl/native/t/3lient.t
  (log2): Add tests for log2 that compares the log output between
    a more perlish method of specificying the rev with a manually
    created _p_svn_opt_revision_t.

Patch by: Roderich Schupp <roderich.schupp{_AT_}gmail.com>
          me
(I took Roderich's patch and moved it to 3client.t and created the
_p_svn_opt_revision_t values directly rather than via
parse_externals_description3())

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=1446761&r1=1446760&r2=1446761&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/swig/perl/native/t/3client.t (original)
+++ subversion/trunk/subversion/bindings/swig/perl/native/t/3client.t Fri Feb 15 20:35:39
2013
@@ -20,7 +20,7 @@
 #
 #
 
-use Test::More tests => 221;
+use Test::More tests => 223;
 use strict;
 
 # shut up about variables that are only used once.
@@ -388,6 +388,28 @@ is($ctx->log("$reposurl/dir1/new",$curre
    'log returns undef');
 
 # TEST
+my $opt_revision_head = SVN::_Core::new_svn_opt_revision_t();
+$opt_revision_head->kind($SVN::Core::opt_revision_head);
+is_deeply(get_log2($opt_revision_head),      # got
+          get_log2("HEAD"));                 # expected
+# TEST
+my $opt_revision_number = SVN::_Core::new_svn_opt_revision_t();
+$opt_revision_number->kind($SVN::Core::opt_revision_number);
+$opt_revision_number->value->number($current_rev);
+is_deeply(get_log2($opt_revision_number),    # got
+          get_log2($current_rev));           # expected
+
+sub get_log2 {
+    my ($rev) = @_;
+    my @log;
+    $ctx->log2($reposurl, $rev, $rev, 0, 0, 0, sub { 
+        my (undef, $revision, $author, $date, $msg, undef) = @_; 
+        push @log, [ $revision, $author, $date, $msg ];
+    });
+    return \@log;
+}
+
+# TEST
 is($ctx->update($wcpath,'HEAD',1),$current_rev,
    'Return from update is the current rev');
 



Mime
View raw message