Commits

Shlomi Fish committed 24e76f1

Remove trailing space.

  • Participants
  • Parent commits 62d78e8

Comments (0)

Files changed (7)

File modules/App-XML-DocBook-Docmake/Changes

+0.0402  Tue 21 May 17:48:25 IDT 2013
+        - Remove trailing space - t/style-trailing-space.t .
+
 0.0401  Wed  5 Sep 19:45:47 IDT 2012
         - Move away tag-release.pl under script.
             - This way it hopefully won't be installed by overzelous

File modules/App-XML-DocBook-Docmake/MANIFEST

 t/boilerplate.t
 t/pod-coverage.t
 t/pod.t
+t/style-trailing-space.t
 META.json

File modules/App-XML-DocBook-Docmake/inc/Test/Run/Builder.pm

         Test::Run::CmdLine::Iface->new(
             {
                 'test_files' => [glob("t/*.t")],
-            }   
+            }
             # 'backend_params' => $self->_get_backend_params(),
         );
 

File modules/App-XML-DocBook-Docmake/lib/App/XML/DocBook/Docmake.pm

 
 =cut
 
-my %modes = 
+my %modes =
 (
     'fo' =>
     {
         $self->_output_path($output_path) ? 1 : 0
     );
 
-    
+
     $self->_verbose($verbose);
     $self->_stylesheet($stylesheet);
     $self->_xslt_stringparams(\@stringparams);
 Available commands:
 
     help - this help screen.
-    
+
     fo - convert to XSL-FO.
     rtf - convert to RTF (MS Word).
     pdf - convert to PDF (Adobe Acrobat).
     my $input_file = $args->{input};
     my $output_file = $args->{output};
     my $template = $args->{template};
-    
+
     return
     [
         map
     {
         @base_path_params =
         (
-            "--path", 
+            "--path",
             ($self->_base_path() . '/' . $self->_xslt_mode()),
         );
     }
- 
+
     return $self->_run_input_output_cmd(
         {
             input => $self->_input_path(),

File modules/App-XML-DocBook-Docmake/script/docmake

 using XSLT: XHTML, XSL-FO, PDF, RTF, etc. For a brief help type
 C<docmake help> .
 
-It aims to be a replacement for xmlto - 
+It aims to be a replacement for xmlto -
 L<http://cyberelk.net/tim/software/xmlto/> . As opposed to xmlto,
 it is written in Perl, which is easier to get right than xmlto's Bash, and
 xmlto hasn't been updated for a long time when I started work on docmake.

File modules/App-XML-DocBook-Docmake/t/01-use.t

 sub _exec_command
 {
     my ($self, $cmd) = @_;
-    
+
     push @commands_executed, [@$cmd];
 }
 
 
 {
     my $docmake = App::XML::DocBook::Docmake->new({argv => ["help"]});
-    
+
     trap { $docmake->run(); };
 
     # TEST
         my $self = shift;
         my $args = shift;
         push @should_update,
-            [ map { $_ => $args->{$_} } 
+            [ map { $_ => $args->{$_} }
              sort { $a cmp $b }
              keys(%$args)
             ]
         my $self = shift;
         my $args = shift;
         push @should_update,
-            [ map { $_ => $args->{$_} } 
+            [ map { $_ => $args->{$_} }
              sort { $a cmp $b }
              keys(%$args)
             ]
                     "lib/docbook/5/essays/foss-and-other-beasts-v3/all-in-one.xhtml.temp.xml",
                 "--path",
                     "/home/shlomif/Download/unpack/file/docbook/docbook-xsl-ns-snapshot/xhtml-1_1",
-                "lib/sgml/shlomif-docbook/xsl-5-stylesheets/shlomif-essays-5-xhtml-onechunk.xsl", 
+                "lib/sgml/shlomif-docbook/xsl-5-stylesheets/shlomif-essays-5-xhtml-onechunk.xsl",
                 "lib/docbook/5/xml/foss-and-other-beasts-v3.xml",
             ]
         ],

File modules/App-XML-DocBook-Docmake/t/style-trailing-space.t

+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More;
+
+eval "use Test::TrailingSpace";
+if ($@)
+{
+    plan skip_all => "Test::TrailingSpace required for trailing space test.";
+}
+else
+{
+    plan tests => 1;
+}
+
+my $finder = Test::TrailingSpace->new(
+    {
+        root => '.',
+        filename_regex => qr/(?:(?:\.(?:t|pm|pl|PL|yml|json|arc|vim))|README|Changes|LICENSE)\z/,
+    },
+);
+
+# TEST
+$finder->no_trailing_space(
+    "No trailing space was found."
+);
+