You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2012/02/07 22:13:45 UTC
svn commit: r1241628 -
/subversion/trunk/subversion/bindings/swig/perl/native/t/3client.t
Author: stsp
Date: Tue Feb 7 21:13:45 2012
New Revision: 1241628
URL: http://svn.apache.org/viewvc?rev=1241628&view=rev
Log:
Make the perl bindings test skip the gnome-keyring test if gnome-keyring
has not been compiled in.
* subversion/bindings/swig/perl/native/t/3client.t
(gnome-kerying test): Skip if auth_set_gnome_keyring_unlock_prompt_func
is not available.
With help from danielsh.
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=1241628&r1=1241627&r2=1241628&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/swig/perl/native/t/3client.t (original)
+++ subversion/trunk/subversion/bindings/swig/perl/native/t/3client.t Tue Feb 7 21:13:45 2012
@@ -477,22 +477,27 @@ foreach my $p (@providers) {
}
ok($ok, 'svn_auth_get_platform_specific_client_providers returns _p_svn_auth_provider_object_t\'s');
-# Test setting gnome_keyring prompt function. This just sets the proper
-# attributes in the auth baton and checks the return value (which should
-# be a reference to the passed function reference). This does not
-# actually try the prompt, since that would require setting up a
-# gnome-keyring-daemon...
-sub gnome_keyring_unlock_prompt {
- my $keyring_name = shift;
- my $pool = shift;
+SKIP: {
+ skip 'Gnome-Keyring support not compiled in', 1
+ unless defined &SVN::Core::auth_set_gnome_keyring_unlock_prompt_func;
- 'test';
-}
+ # Test setting gnome_keyring prompt function. This just sets the proper
+ # attributes in the auth baton and checks the return value (which should
+ # be a reference to the passed function reference). This does not
+ # actually try the prompt, since that would require setting up a
+ # gnome-keyring-daemon...
+ sub gnome_keyring_unlock_prompt {
+ my $keyring_name = shift;
+ my $pool = shift;
+
+ 'test';
+ }
-my $callback = \&gnome_keyring_unlock_prompt;
-my $result = SVN::Core::auth_set_gnome_keyring_unlock_prompt_func(
- $ctx->auth(), $callback);
-is(${$result}, $callback, 'auth_set_gnome_keyring_unlock_prompt_func result equals paramter');
+ my $callback = \&gnome_keyring_unlock_prompt;
+ my $result = SVN::Core::auth_set_gnome_keyring_unlock_prompt_func(
+ $ctx->auth(), $callback);
+ is(${$result}, $callback, 'auth_set_gnome_keyring_unlock_prompt_func result equals paramter');
+}
END {
diag('cleanup');