r46302 - in /branches/upstream/libwordpress-xmlrpc-perl/current: ./ lib/WordPress/ t/

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Sat Oct 24 14:04:43 UTC 2009


Author: jawnsy-guest
Date: Sat Oct 24 14:03:48 2009
New Revision: 46302

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=46302
Log:
[svn-upgrade] Integrating new upstream version, libwordpress-xmlrpc-perl (1.21)

Modified:
    branches/upstream/libwordpress-xmlrpc-perl/current/Changes
    branches/upstream/libwordpress-xmlrpc-perl/current/META.yml
    branches/upstream/libwordpress-xmlrpc-perl/current/lib/WordPress/XMLRPC.pm
    branches/upstream/libwordpress-xmlrpc-perl/current/lib/WordPress/XMLRPC.pod
    branches/upstream/libwordpress-xmlrpc-perl/current/t/00_basic.t
    branches/upstream/libwordpress-xmlrpc-perl/current/t/02_XMLRPC.t
    branches/upstream/libwordpress-xmlrpc-perl/current/t/04_XMLRPC_page.t
    branches/upstream/libwordpress-xmlrpc-perl/current/t/04_XMLRPC_post.t
    branches/upstream/libwordpress-xmlrpc-perl/current/t/10_XMLRPC.t.optional
    branches/upstream/libwordpress-xmlrpc-perl/current/t/11_category.t
    branches/upstream/libwordpress-xmlrpc-perl/current/t/12_categories.t
    branches/upstream/libwordpress-xmlrpc-perl/current/t/14_options.t
    branches/upstream/libwordpress-xmlrpc-perl/current/t/15_templates.t
    branches/upstream/libwordpress-xmlrpc-perl/current/t/16_tags.t
    branches/upstream/libwordpress-xmlrpc-perl/current/t/17_comments.t
    branches/upstream/libwordpress-xmlrpc-perl/current/t/test.pl

Modified: branches/upstream/libwordpress-xmlrpc-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwordpress-xmlrpc-perl/current/Changes?rev=46302&op=diff
==============================================================================
--- branches/upstream/libwordpress-xmlrpc-perl/current/Changes (original)
+++ branches/upstream/libwordpress-xmlrpc-perl/current/Changes Sat Oct 24 14:03:48 2009
@@ -1,3 +1,16 @@
+2009-09-25 09:55  cvs
+
+	* lib/WordPress/XMLRPC.pm, t/00_basic.t, t/02_XMLRPC.t,
+	  t/04_XMLRPC_page.t, t/04_XMLRPC_post.t, t/10_XMLRPC.t.optional,
+	  t/11_category.t, t/12_categories.t, t/14_options.t,
+	  t/15_templates.t, t/16_tags.t, t/17_comments.t, t/test.pl: Made
+	  sure some tests skip out if ENV FULLTESTING is set to 0- or if
+	  t/wppost is not present.  Fixed bug in test 12.
+
+2009-09-09 14:59  cvs
+
+	* lib/WordPress/XMLRPC.pod: Fixed up documentation formatting.
+
 2009-09-09 11:37  cvs
 
 	* Makefile.PL, README, lib/WordPress/XMLRPC.pm,

Modified: branches/upstream/libwordpress-xmlrpc-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwordpress-xmlrpc-perl/current/META.yml?rev=46302&op=diff
==============================================================================
--- branches/upstream/libwordpress-xmlrpc-perl/current/META.yml (original)
+++ branches/upstream/libwordpress-xmlrpc-perl/current/META.yml Sat Oct 24 14:03:48 2009
@@ -1,14 +1,12 @@
 --- #YAML:1.0
 name:               WordPress-XMLRPC
-version:            1.20
+version:            1.21
 abstract:           api to wordpress xml rpc calls
 author:
     - Leo Charre leocharre at cpan dot org
 license:            perl
 distribution_type:  module
 configure_requires:
-    ExtUtils::MakeMaker:  0
-build_requires:
     ExtUtils::MakeMaker:  0
 requires:
     LEOCHARRE::CLI2:   0
@@ -21,7 +19,7 @@
     directory:
         - t
         - inc
-generated_by:       ExtUtils::MakeMaker version 6.50
+generated_by:       ExtUtils::MakeMaker version 6.48
 meta-spec:
     url:      http://module-build.sourceforge.net/META-spec-v1.4.html
     version:  1.4

Modified: branches/upstream/libwordpress-xmlrpc-perl/current/lib/WordPress/XMLRPC.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwordpress-xmlrpc-perl/current/lib/WordPress/XMLRPC.pm?rev=46302&op=diff
==============================================================================
--- branches/upstream/libwordpress-xmlrpc-perl/current/lib/WordPress/XMLRPC.pm (original)
+++ branches/upstream/libwordpress-xmlrpc-perl/current/lib/WordPress/XMLRPC.pm Sat Oct 24 14:03:48 2009
@@ -3,8 +3,9 @@
 use strict;
 use Carp;
 use LEOCHARRE::Debug;
-use vars qw($VERSION);
-$VERSION = sprintf "%d.%02d", q$Revision: 1.20 $ =~ /(\d+)/g;
+use vars qw($VERSION $DEBUG);
+$VERSION = sprintf "%d.%02d", q$Revision: 1.21 $ =~ /(\d+)/g;
+
 
 sub new {
    my ($class,$self) = @_;

Modified: branches/upstream/libwordpress-xmlrpc-perl/current/lib/WordPress/XMLRPC.pod
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwordpress-xmlrpc-perl/current/lib/WordPress/XMLRPC.pod?rev=46302&op=diff
==============================================================================
--- branches/upstream/libwordpress-xmlrpc-perl/current/lib/WordPress/XMLRPC.pod (original)
+++ branches/upstream/libwordpress-xmlrpc-perl/current/lib/WordPress/XMLRPC.pod Sat Oct 24 14:03:48 2009
@@ -7,7 +7,7 @@
 =head1 SYNOPSIS
 
    use WordPress::XMLRPC;
-   
+      
    my $o = WordPress:::XMLRPC->new({
      username => 'author1',
      password => 'superpass',
@@ -67,7 +67,7 @@
             $self->password,
             $self->proxy,
          );
- 
+
 =head1 METHODS
 
 =head2 xmlrpc_methods()
@@ -318,21 +318,25 @@
 
 Argument is category id, will return struct (hash ref).
 
-   ### $got: {
-   ####         categoryId => 99,
-   ####         categoryName => 'category772',
-   ####         description => 'category772',
-   ####         htmlUrl => 'http://leocharre.com/articles/category/category772/',
-   ####         parentId => '0',
-   ####         rssUrl => 'http://leocharre.com/articles/category/category772/feed/'
-   ####       }
-
-=head4 CAVEAT 
+   $got: {
+           categoryId => 99,
+           categoryName => 'category772',
+           description => 'category772',
+           htmlUrl => 'http://leocharre.com/articles/category/category772/',
+           parentId => '0',
+           rssUrl => 'http://leocharre.com/articles/category/category772/feed/'
+         }
+
+=over 4
+
+=item CAVEAT 
 
 There seems to be a bug in xmlrpc.php (wordpress v 2.3.2) , that does not fill out 
 the categories properly. You can use  newCategory() to insert a description, bu
 upon getCategory(), the struct description is replaced by the categoryName field.
 
+=back
+
 =head3 suggestCategories()
 
 Takes 2 optional args: category, max_results.
@@ -348,65 +352,65 @@
 
 And you have a 'drawing' category, it returns:
 
-   ### $r: [
-   ###       {
-   ###         category_id => '187',
-   ###         category_name => 'drawing'
-   ###       }
-   ###     ]
+   $r: [
+         {
+           category_id => '187',
+           category_name => 'drawing'
+         }
+       ]
 
 With no arguments, example return:
 
-   ### $r: [
-   ###       {
-   ###         category_id => '4',
-   ###         category_name => 'art'
-   ###       },
-   ###       {
-   ###         category_id => '196',
-   ###         category_name => 'category528'
-   ###       },
-   ###       {
-   ###         category_id => '197',
-   ###         category_name => 'category528 appended'
-   ###       },
-   ###       {
-   ###         category_id => '203',
-   ###         category_name => 'category919 appended'
-   ###       },
-   ###       {
-   ###         category_id => '184',
-   ###         category_name => 'design'
-   ###       },
-   ###       {
-   ###         category_id => '183',
-   ###         category_name => 'dev'
-   ###       },
-   ###       {
-   ###         category_id => '187',
-   ###         category_name => 'drawing'
-   ###       },
-   ###       {
-   ###         category_id => '190',
-   ###         category_name => 'graphic'
-   ###       },
-   ###       {
-   ###         category_id => '5',
-   ###         category_name => 'near life experience'
-   ###       },
-   ###       {
-   ###         category_id => '188',
-   ###         category_name => 'painting'
-   ###       },
-   ###       {
-   ###         category_id => '189',
-   ###         category_name => 'pinup'
-   ###       },
-   ###       {
-   ###         category_id => '186',
-   ###         category_name => 'web'
-   ###       }
-   ###     ]
+   $r: [
+         {
+           category_id => '4',
+           category_name => 'art'
+         },
+         {
+           category_id => '196',
+           category_name => 'category528'
+         },
+         {
+           category_id => '197',
+           category_name => 'category528 appended'
+         },
+         {
+           category_id => '203',
+           category_name => 'category919 appended'
+         },
+         {
+           category_id => '184',
+           category_name => 'design'
+         },
+         {
+           category_id => '183',
+           category_name => 'dev'
+         },
+         {
+           category_id => '187',
+           category_name => 'drawing'
+         },
+         {
+           category_id => '190',
+           category_name => 'graphic'
+         },
+         {
+           category_id => '5',
+           category_name => 'near life experience'
+         },
+         {
+           category_id => '188',
+           category_name => 'painting'
+         },
+         {
+           category_id => '189',
+           category_name => 'pinup'
+         },
+         {
+           category_id => '186',
+           category_name => 'web'
+         }
+       ]
 
 =head3 deleteCategory()
 
@@ -422,16 +426,7 @@
 
 =cut
 
-
-
-
-
-
-
-
-=cut
-
-=head2 getComment()
+=head3 getComment()
 
 Takes 1 args: comment_id (number).
 Returns struct (hashref).
@@ -439,41 +434,41 @@
    $o->getComment(2603);
 
 Example return value:
-   ### $r: {
-   ###       author => 'santrex sucks',
-   ###       author_email => 'webmaster at santrexsucks.com',
-   ###       author_ip => '66.165.246.149',
-   ###       author_url => 'http://santrexsucks.com',
-   ###       comment_id => '2603',
-   ###       content => 'santrex is the worst hosting company ive ever used. santrex should be avoided at all costs!',
-   ###       date_created_gmt => '20090617T00:17:54',
-   ###       link => 'http://leocharre.com/articles/its-on-bitch/comment-page-1/#comment-2603',
-   ###       parent => '0',
-   ###       post_id => '372',
-   ###       post_title => 'IT’S ON BITCH',
-   ###       status => 'approve',
-   ###       type => '',
-   ###       user_id => '0'
-   ###     }
-
-=head2 getComments()
+   $r: {
+         author => 'santrex sucks',
+         author_email => 'webmaster at santrexsucks.com',
+         author_ip => '66.165.246.149',
+         author_url => 'http://santrexsucks.com',
+         comment_id => '2603',
+         content => 'santrex is the worst hosting company ive ever used. santrex should be avoided at all costs!',
+         date_created_gmt => '20090617T00:17:54',
+         link => 'http://leocharre.com/articles/its-on-bitch/comment-page-1/#comment-2603',
+         parent => '0',
+         post_id => '372',
+         post_title => 'IT’S ON BITCH',
+         status => 'approve',
+         type => '',
+         user_id => '0'
+       }
+
+=head3 getComments()
 
 Takes 1 args: struct (hashref).
 NOTE: Untested. If you have info on this, send it in.
 
-=head2 deleteComment()
+=head3 deleteComment()
 
 Takes 1 args: comment_id (number).
 Returns bool true or false.
 
    $o->deleteComment(2603);
 
-=head2 editComment()
+=head3 editComment()
 
 Takes 2 args: comment_id (number), content_struct (hashref).
 
 
-=head2 newComment()
+=head3 newComment()
 
 Takes 2 args: post id, content_struct (hashref).
 Returns new comment id (number).
@@ -482,32 +477,20 @@
 
    $o->newComment( 15, { status => 'approve', content => "Hi there, this is a note." } );
 
-=head2 getCommentStatusList()
+=head3 getCommentStatusList()
 
 Takes no argument.
 Returns hashref.
 
 Example return value:
-   ### $r: {
-   ###       approve => 'Approved',
-   ###       hold => 'Unapproved',
-   ###       spam => 'Spam'
-   ###     }
-
-
-=pod
-
-
-
-
-
-
-
-
-
-=cut
-
-=head2 getOptions()
+   $r: {
+         approve => 'Approved',
+         hold => 'Unapproved',
+         spam => 'Spam'
+       }
+
+
+=head3 getOptions()
 
 Optional arguments are, a list of option names.
 If you do not pass a list of options assumes all are chosen.
@@ -530,48 +513,48 @@
 
 Example return value (with no arguments):
 
-   ### $options: {
-   ###             blog_tagline => {
-   ###                               desc => 'Blog Tagline',
-   ###                               readonly => '0',
-   ###                               value => 'pinup art, perl, unix, developer smorgasbord'
-   ###                             },
-   ###             blog_title => {
-   ###                             desc => 'Blog Title',
-   ###                             readonly => '0',
-   ###                             value => 'leo charre'
-   ###                           },
-   ###             blog_url => {
-   ###                           desc => 'Blog URL',
-   ###                           readonly => '1',
-   ###                           value => 'http://leocharre.com'
-   ###                         },
-   ###             date_format => {
-   ###                              desc => 'Date Format',
-   ###                              readonly => '0',
-   ###                              value => 'F j, Y'
-   ###                            },
-   ###             software_name => {
-   ###                                desc => 'Software Name',
-   ###                                readonly => '1',
-   ###                                value => 'WordPress'
-   ###                              },
-   ###             software_version => {
-   ###                                   desc => 'Software Version',
-   ###                                   readonly => '1',
-   ###                                   value => '2.8.4'
-   ###                                 },
-   ###             time_format => {
-   ###                              desc => 'Time Format',
-   ###                              readonly => '0',
-   ###                              value => 'g:i a'
-   ###                            },
-   ###             time_zone => {
-   ###                            desc => 'Time Zone',
-   ###                            readonly => '0',
-   ###                            value => '-8'
-   ###                          }
-   ###           }
+   $options: {
+               blog_tagline => {
+                                 desc => 'Blog Tagline',
+                                 readonly => '0',
+                                 value => 'pinup art, perl, unix, developer smorgasbord'
+                               },
+               blog_title => {
+                               desc => 'Blog Title',
+                               readonly => '0',
+                               value => 'leo charre'
+                             },
+               blog_url => {
+                             desc => 'Blog URL',
+                             readonly => '1',
+                             value => 'http://leocharre.com'
+                           },
+               date_format => {
+                                desc => 'Date Format',
+                                readonly => '0',
+                                value => 'F j, Y'
+                              },
+               software_name => {
+                                  desc => 'Software Name',
+                                  readonly => '1',
+                                  value => 'WordPress'
+                                },
+               software_version => {
+                                     desc => 'Software Version',
+                                     readonly => '1',
+                                     value => '2.8.4'
+                                   },
+               time_format => {
+                                desc => 'Time Format',
+                                readonly => '0',
+                                value => 'g:i a'
+                              },
+               time_zone => {
+                              desc => 'Time Zone',
+                              readonly => '0',
+                              value => '-8'
+                            }
+             }
 
 
 Example usage:
@@ -580,7 +563,7 @@
    my $options = $o->getOptions;
 
 
-=head2 setOptions()
+=head3 setOptions()
 
 Takes 1 args: options hash ref.
 Returns same as getOptions().
@@ -599,17 +582,16 @@
 
 This would return:
 
-   ### $out: {
-   ###         blog_tagline => {
-   ###                           desc => 'Blog Tagline',
-   ###                           readonly => '0',
-   ###                           value => 'New tagline for this blog, this is the best blog ever', 
-   ###                         }
-   ###       }
+   $out: {
+           blog_tagline => {
+                             desc => 'Blog Tagline',
+                             readonly => '0',
+                             value => 'New tagline for this blog, this is the best blog ever', 
+                           }
+         }
 
 The value taken by setOptions() should be the same as returned by getOptions(). This is more proof
 that php "coders" have no discipline. As if proof were needed. Ok, maybe that's too harsh.
-
 
 =cut
 
@@ -676,17 +658,6 @@
 
 Each element is hash ref same as getPost() would return.
 
-=cut
-
-
-
-
-
-
-
-
-=pod
-
 =head3 uploadFile()
 
 Takes 1 args: data.
@@ -697,44 +668,28 @@
 Takes 1 args: data (hashref).
 The hashref keys and values are bits (Mime::Base64), type (mime type), and name (filename).
 
-=cut
-
-
-
-
-
-
-
-
-=pod
-
 =head3 getTemplate()
 
 Takes 1 args: template name (string).
 NOTE: This fails. Don't know why. If you have any idea, contact AUTHOR.
 
-
 =head3 setTemplate()
 
 Takes 2 args: content, template.
 NOTE: Untested.
 
-=head2 getPageTemplates()
+=head3 getPageTemplates()
 
 Takes no args.
 Returns hashref.
 
 Example return:
 
-   ### return: {
-   ###           Default => 'default',
-   ###           'Link Categories' => 'link_categories.php',
-   ###           Links => 'links.php'
-   ###         }
-
-=cut
-
-=pod
+   return: {
+             Default => 'default',
+             'Link Categories' => 'link_categories.php',
+             Links => 'links.php'
+           }
 
 =head3 getTags()
 
@@ -743,40 +698,33 @@
 
 Example return:
 
-   ### return: [
-   ###           {
-   ###             count => '1',
-   ###             html_url => 'http://leocharre.com/articles/tag/avi/',
-   ###             name => 'avi',
-   ###             rss_url => 'http://leocharre.com/articles/tag/avi/feed/',
-   ###             slug => 'avi',
-   ###             tag_id => '158'
-   ###           },
-   ###           {
-   ###             count => '1',
-   ###             html_url => 'http://leocharre.com/articles/tag/bugzilla/',
-   ###             name => 'bugzilla',
-   ###             rss_url => 'http://leocharre.com/articles/tag/bugzilla/feed/',
-   ###             slug => 'bugzilla',
-   ###             tag_id => '195'
-   ###           },
-   ###           {
-   ###             count => '1',
-   ###             html_url => 'http://leocharre.com/articles/tag/callback/',
-   ###             name => 'callback',
-   ###             rss_url => 'http://leocharre.com/articles/tag/callback/feed/',
-   ###             slug => 'callback',
-   ###             tag_id => '30'
-   ###           },
-   ###         ]
-   ###      ... .etc.....
-
-
-=cut
-
-
-
-
+   return: [
+             {
+               count => '1',
+               html_url => 'http://leocharre.com/articles/tag/avi/',
+               name => 'avi',
+               rss_url => 'http://leocharre.com/articles/tag/avi/feed/',
+               slug => 'avi',
+               tag_id => '158'
+             },
+             {
+               count => '1',
+               html_url => 'http://leocharre.com/articles/tag/bugzilla/',
+               name => 'bugzilla',
+               rss_url => 'http://leocharre.com/articles/tag/bugzilla/feed/',
+               slug => 'bugzilla',
+               tag_id => '195'
+             },
+             {
+               count => '1',
+               html_url => 'http://leocharre.com/articles/tag/callback/',
+               name => 'callback',
+               rss_url => 'http://leocharre.com/articles/tag/callback/feed/',
+               slug => 'callback',
+               tag_id => '30'
+             },
+           ]
+        ... .etc.....
 
 =head3 getUsersBlogs()
 
@@ -792,19 +740,10 @@
 	       }
 	     ]
 
-=cut
-
-
-
-
-
-
-=pod
-
 =head1 DEBUG
 
 This is useful if you get errors..
-   
+
    $WordPress::XMLRPC::DEBUG = 1;
 
 =head1 WISHLIST

Modified: branches/upstream/libwordpress-xmlrpc-perl/current/t/00_basic.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwordpress-xmlrpc-perl/current/t/00_basic.t?rev=46302&op=diff
==============================================================================
--- branches/upstream/libwordpress-xmlrpc-perl/current/t/00_basic.t (original)
+++ branches/upstream/libwordpress-xmlrpc-perl/current/t/00_basic.t Sat Oct 24 14:03:48 2009
@@ -9,10 +9,8 @@
 ok(1,'starting test.');
 
 
-if( ! -f './t/wppost' ){
-   ok(1, 'see README');
-   exit;
-}
+assure_fulltesting();
+
 
 
 ### BASIC SERVER/MODULE TEST

Modified: branches/upstream/libwordpress-xmlrpc-perl/current/t/02_XMLRPC.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwordpress-xmlrpc-perl/current/t/02_XMLRPC.t?rev=46302&op=diff
==============================================================================
--- branches/upstream/libwordpress-xmlrpc-perl/current/t/02_XMLRPC.t (original)
+++ branches/upstream/libwordpress-xmlrpc-perl/current/t/02_XMLRPC.t Sat Oct 24 14:03:48 2009
@@ -7,11 +7,9 @@
 
 ok(1,'starting test.');
 
+assure_fulltesting();
 
-if( ! -f './t/wppost' ){
-   ok(1, 'see README for further testing, skipped.');
-   exit;
-}
+
 
 
 

Modified: branches/upstream/libwordpress-xmlrpc-perl/current/t/04_XMLRPC_page.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwordpress-xmlrpc-perl/current/t/04_XMLRPC_page.t?rev=46302&op=diff
==============================================================================
--- branches/upstream/libwordpress-xmlrpc-perl/current/t/04_XMLRPC_page.t (original)
+++ branches/upstream/libwordpress-xmlrpc-perl/current/t/04_XMLRPC_page.t Sat Oct 24 14:03:48 2009
@@ -7,11 +7,7 @@
 
 ok(1,'starting test.');
 
-if( ! -f './t/wppost' ){
-   ok(1, 'see README');
-   exit;
-}
-
+assure_fulltesting();
 
 
 my $w = WordPress::XMLRPC->new(_conf('./t/wppost'));

Modified: branches/upstream/libwordpress-xmlrpc-perl/current/t/04_XMLRPC_post.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwordpress-xmlrpc-perl/current/t/04_XMLRPC_post.t?rev=46302&op=diff
==============================================================================
--- branches/upstream/libwordpress-xmlrpc-perl/current/t/04_XMLRPC_post.t (original)
+++ branches/upstream/libwordpress-xmlrpc-perl/current/t/04_XMLRPC_post.t Sat Oct 24 14:03:48 2009
@@ -7,10 +7,8 @@
 
 ok(1,'starting test.');
 
-if( ! -f './t/wppost' ){
-   ok(1, 'see README');
-   exit;
-}
+assure_fulltesting();
+
 
 
 

Modified: branches/upstream/libwordpress-xmlrpc-perl/current/t/10_XMLRPC.t.optional
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwordpress-xmlrpc-perl/current/t/10_XMLRPC.t.optional?rev=46302&op=diff
==============================================================================
--- branches/upstream/libwordpress-xmlrpc-perl/current/t/10_XMLRPC.t.optional (original)
+++ branches/upstream/libwordpress-xmlrpc-perl/current/t/10_XMLRPC.t.optional Sat Oct 24 14:03:48 2009
@@ -7,10 +7,7 @@
 ok(1,'starting test.');
 
 
-if( ! -f './t/wppost' ){
-   ok(1, usage());
-   exit;
-}
+assure_fulltesting();
 
 
 

Modified: branches/upstream/libwordpress-xmlrpc-perl/current/t/11_category.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwordpress-xmlrpc-perl/current/t/11_category.t?rev=46302&op=diff
==============================================================================
--- branches/upstream/libwordpress-xmlrpc-perl/current/t/11_category.t (original)
+++ branches/upstream/libwordpress-xmlrpc-perl/current/t/11_category.t Sat Oct 24 14:03:48 2009
@@ -7,15 +7,15 @@
 use Smart::Comments '###';
 
 ok(1,'starting test.');
+
 my $r;
 
 
 print STDERR " # WordPress has a bug - i think.. it doesn't register new categories properly via rpc\n\n";
 
-if( ! -f './t/wppost' ){
-   ok(1, 'see README for further testing, skipped.');
-   exit;
-}
+
+assure_fulltesting();
+
 
 
 

Modified: branches/upstream/libwordpress-xmlrpc-perl/current/t/12_categories.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwordpress-xmlrpc-perl/current/t/12_categories.t?rev=46302&op=diff
==============================================================================
--- branches/upstream/libwordpress-xmlrpc-perl/current/t/12_categories.t (original)
+++ branches/upstream/libwordpress-xmlrpc-perl/current/t/12_categories.t Sat Oct 24 14:03:48 2009
@@ -8,12 +8,9 @@
 
 # WordPress has a bug - i think.. it doesn't register new categories properly via rpc
 
+assure_fulltesting();
 
 
-if( ! -f './t/wppost' ){
-   ok(1, 'see README for further testing, skipped.');
-   exit;
-}
 
 
 
@@ -26,10 +23,12 @@
 my $new_category_name ='category' .( int rand 1000 );
 print STDERR "new category name : $new_category_name\n";
 my $new_category_id;
-ok( $new_category_id = $w->newCategory({
-   name => $new_category_name, 
-   description => ' different description then name..', # not supported, apparently
-   }) ) 
+ok( 
+   $new_category_id = $w->newCategory({
+      name => $new_category_name, 
+      description => ' different description then name..', # not supported, apparently
+   }),
+   'newCategory()' ) 
    or die("failed name => '$new_category_name',  ".$w->errstr );
 
 print STDERR " gets id :  $new_category_id\n\n\n";
@@ -63,28 +62,9 @@
 
 my $ncn = 'testcat'.( int rand 10000 );
 
-print STDERR "\n\n=======\nnewCategory.. \n";
-my $newCategory = $w->newCategory({ name => $ncn}) 
+print STDERR "\n\n=======\n";
+my $newCategory_id;
+ok( $newCategory_id = $w->newCategory({ name => $ncn}), 'newCategory()') 
    or warn("newCategory no return, " . $w->errstr );
 
-
-### $newCategory
-unless( ok( $newCategory->{categoryName} eq $ncn ) ){
-   my @k = keys %$newCategory;
-   print STDERR "keys: ".scalar @k."\n";
-   for my $k  (@k){
-      my $v = $newCategory->{$k};
-      print STDERR" k:$k, v:$v\n";
-   }
-
- die;
-}
-
-
-
-
-
-
-#my $suggestCategories = $w->suggestCategories;
-#ok($suggestCategories, "suggestCategories()");
-## $suggestCategories
+warn "#returned $newCategory_id";

Modified: branches/upstream/libwordpress-xmlrpc-perl/current/t/14_options.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwordpress-xmlrpc-perl/current/t/14_options.t?rev=46302&op=diff
==============================================================================
--- branches/upstream/libwordpress-xmlrpc-perl/current/t/14_options.t (original)
+++ branches/upstream/libwordpress-xmlrpc-perl/current/t/14_options.t Sat Oct 24 14:03:48 2009
@@ -5,12 +5,10 @@
 use WordPress::XMLRPC;
 no strict 'refs';
 use Smart::Comments '###';
+
 ok(1,'starting test.');
 
-if( ! -f './t/wppost' ){
-   ok(1, 'see README for further testing, skipped.');
-   exit;
-}
+assure_fulltesting();
 
 $WordPress::XMLRPC::DEBUG = 1;
 

Modified: branches/upstream/libwordpress-xmlrpc-perl/current/t/15_templates.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwordpress-xmlrpc-perl/current/t/15_templates.t?rev=46302&op=diff
==============================================================================
--- branches/upstream/libwordpress-xmlrpc-perl/current/t/15_templates.t (original)
+++ branches/upstream/libwordpress-xmlrpc-perl/current/t/15_templates.t Sat Oct 24 14:03:48 2009
@@ -7,10 +7,8 @@
 use Smart::Comments '###';
 ok(1,'starting test.');
 
-if( ! -f './t/wppost' ){
-   ok(1, 'see README for further testing, skipped.');
-   exit;
-}
+
+assure_fulltesting();
 
 $WordPress::XMLRPC::DEBUG = 1;
 my $w = WordPress::XMLRPC->new(_conf('./t/wppost'));

Modified: branches/upstream/libwordpress-xmlrpc-perl/current/t/16_tags.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwordpress-xmlrpc-perl/current/t/16_tags.t?rev=46302&op=diff
==============================================================================
--- branches/upstream/libwordpress-xmlrpc-perl/current/t/16_tags.t (original)
+++ branches/upstream/libwordpress-xmlrpc-perl/current/t/16_tags.t Sat Oct 24 14:03:48 2009
@@ -7,10 +7,8 @@
 use Smart::Comments '###';
 ok(1,'starting test.');
 
-if( ! -f './t/wppost' ){
-   ok(1, 'see README for further testing, skipped.');
-   exit;
-}
+
+assure_fulltesting();
 
 $WordPress::XMLRPC::DEBUG = 1;
 my $w = WordPress::XMLRPC->new(_conf('./t/wppost'));

Modified: branches/upstream/libwordpress-xmlrpc-perl/current/t/17_comments.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwordpress-xmlrpc-perl/current/t/17_comments.t?rev=46302&op=diff
==============================================================================
--- branches/upstream/libwordpress-xmlrpc-perl/current/t/17_comments.t (original)
+++ branches/upstream/libwordpress-xmlrpc-perl/current/t/17_comments.t Sat Oct 24 14:03:48 2009
@@ -10,10 +10,7 @@
 my $r;
 
 
-if( ! -f './t/wppost' ){
-   ok(1, 'see README for further testing, skipped.');
-   exit;
-}
+assure_fulltesting();
 
 my $w = WordPress::XMLRPC->new(_conf('./t/wppost'));
 $WordPress::XMLRPC::DEBUG = 1;

Modified: branches/upstream/libwordpress-xmlrpc-perl/current/t/test.pl
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwordpress-xmlrpc-perl/current/t/test.pl?rev=46302&op=diff
==============================================================================
--- branches/upstream/libwordpress-xmlrpc-perl/current/t/test.pl (original)
+++ branches/upstream/libwordpress-xmlrpc-perl/current/t/test.pl Sat Oct 24 14:03:48 2009
@@ -1,4 +1,19 @@
 use strict;
+
+
+sub assure_fulltesting {
+   if( ! -f './t/wppost' ){
+      warn "# ./t/wppost not on disk.\n";
+      $ENV{FULLTESTING} = 0;
+   }
+   if ( exists $ENV{FULLTESTING} and (!$ENV{FULLTESTING}) ){ 
+         warn "# FULLTESTING is off.\n$0 skipping.\n";
+         warn "# see README for further testing.\n\n";
+         exit;
+   }
+}
+
+
 
 sub _conf {
    my $abs = shift;




More information about the Pkg-perl-cvs-commits mailing list