Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix scribe check for apache fop

  • Loading branch information...
commit 104e1c8c802760a000991a319ac0ce5480301f93 1 parent 59aff59
@avsej avsej authored
Showing with 12 additions and 1 deletion.
  1. +1 −1  lib/git-scribe/check.rb
  2. +11 −0 test/check_test.rb
View
2  lib/git-scribe/check.rb
@@ -42,7 +42,7 @@ def check(args = [])
# check for fop
- if !check_can_run('fop -version')
+ if !check_can_run('fop -v -out list')
info "fop is not present, please install for PDF generation"
status[:fop] = false
else
View
11 test/check_test.rb
@@ -9,4 +9,15 @@
status = @scribe.check
assert_equal status.size, 6
end
+
+ # there no option '-version' for apache fop cli
+ # it accepts only '-v' option but doesn't exit immediately.
+ # it should be additional no-op flag provided (like '-out list')
+ #
+ # see http://svn.apache.org/repos/asf/xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/CommandLineOptions.java
+ test "scribe should correctly check fop availability" do
+ assert_equal @scribe.check_can_run('fop -v -out list'), true
+ assert_equal @scribe.check_can_run('fop -v'), false
+ assert_equal @scribe.check_can_run('fop -version'), false
+ end
end
Please sign in to comment.
Something went wrong with that request. Please try again.