Hi folks, > I believe the swig perl tests (invoked by running 'make > check-swig-pl') are in subversion/bindings/swig/perl/native/t/ Ah, I'd looked over that very small directory name, I guess :-)
I've attached an updated patch with a test case. The testcase is a bity ugly, since it tests each element of the returned array and keeps the result in its own variable. This is needed since I can't predict how many elements there will be in the returned array, but I didn't want to change the test case too invasively (to use the done_testing function, for example). Gr. Matthijs
Index: subversion-1.6.12dfsg/subversion/bindings/swig/include/svn_containers.swg
===================================================================
--- subversion-1.6.12dfsg.orig/subversion/bindings/swig/include/svn_containers.swg 2010-09-08 20:00:18.000000000 +0200
+++ subversion-1.6.12dfsg/subversion/bindings/swig/include/svn_containers.swg 2010-09-08 20:00:22.000000000 +0200
@@ -808,3 +808,13 @@
%typemap(argout) apr_array_header_t **RANGELIST_INOUT =
apr_array_header_t **RANGELIST;
#endif
+
+/* -----------------------------------------------------------------------
+ Output of apr_array_header_t * <svn_auth_provider_object_t *>
+*/
+#ifdef SWIGPERL
+%typemap(argout) apr_array_header_t **providers {
+ %append_output(svn_swig_pl_convert_array(*$1,
+ $descriptor(svn_auth_provider_object_t *)));
+}
+#endif
Index: subversion-1.6.12dfsg/subversion/bindings/swig/perl/native/t/3client.t
===================================================================
--- subversion-1.6.12dfsg.orig/subversion/bindings/swig/perl/native/t/3client.t 2010-09-10 21:21:03.000000000 +0200
+++ subversion-1.6.12dfsg/subversion/bindings/swig/perl/native/t/3client.t 2010-09-13 11:54:21.000000000 +0200
@@ -1,6 +1,6 @@
#!/usr/bin/perl -w
-use Test::More tests => 118;
+use Test::More tests => 119;
use strict;
# shut up about variables that are only used once.
@@ -444,6 +444,19 @@
'Successfully set auth_baton back to old value');
}
+# Keep track of the ok-ness ourselves, since we need to know the exact
+# number of tests at the start of this file. The 'subtest' feature of
+# Test::More would be perfect for this, but it's only available in very
+# recent perl versions, it seems.
+my $ok = 1;
+# Get a list of platform specific providers, using the default
+# configuration and pool.
+my @providers = @{SVN::Core::auth_get_platform_specific_client_providers(undef, undef)};
+foreach my $p (@providers) {
+ $ok &= defined($p) && $p->isa('_p_svn_auth_provider_object_t');
+}
+ok($ok, 'svn_auth_get_platform_specific_client_providers returns _p_svn_auth_provider_object_t\'s');
+
END {
diag('cleanup');
rmtree($testpath);
signature.asc
Description: Digital signature

