1. Shlomi Fish
  2. perl-SVN-RaWeb-Light

Commits

shl...@52c325ad-5fd0-0310-8a0f-c43feede02cc  committed fb3f67a

Added the Test::LimitOutput module which will contain various classes for
limiting the output of the modules.

Modified one of the tests to check only the dir-contents list.

  • Participants
  • Parent commits 62606b2
  • Branches default

Comments (0)

Files changed (2)

File SVN/RaWeb/Light/Test/LimitOutput.pm

View file
+package SVN::RaWeb::Light::OutputListOnly;
+
+use base 'SVN::RaWeb::Light';
+
+sub process_dir
+{
+    my $self = shift;
+    $self->get_dir();
+    $self->print_items_list();
+}
+
+1;
+

File t/01output.t

View file
 
 use SVN::RaWeb::Light;
 
+use SVN::RaWeb::Light::Test::LimitOutput;
+
+package main;
+
 {
     @CGI::new_params = ('path_info' => "/trunk/hello/");
 
 
     # TEST
     ok(!$@, "Testing that no exception was thrown.");
+
+    
     
     my $results = get_out_buffer();
 
     reset_out_buffer();
 
     my $svn_ra_web =
-        SVN::RaWeb::Light->new(
+        SVN::RaWeb::Light::OutputListOnly->new(
             'url' => "http://svn-i.shlomifish.org/svn/myrepos/"
         );
 
     my $results = get_out_buffer();
 
     # TEST
-    is($results, ("Content-Type: text/html\n\n" . 
-        "<html><head><title>Revision 150: /trunk/subversion</title></head>\n" .
-        "<body>\n" .
-        "<h2>Revision 150: /trunk/subversion</h2>\n" .
+    is($results, (
         "<ul>\n" .
         "<li><a href=\"../?rev=150\">..</a></li>\n" .
         "<li><a href=\"parser?rev=150\">parser</a></li>\n" .
         "<li><a href=\"the-directory/?rev=150\">the-directory/</a></li>\n" .
         "<li><a href=\"yowza.txt?rev=150\">yowza.txt</a></li>\n" .
-        "</ul>\n".
-        "</body></html>\n"),
+        "</ul>\n"),
         "Checking for valid output of a dir listing in root");
 }