Skip to content

Commit

Permalink
fix scribe check for apache fop
Browse files Browse the repository at this point in the history
  • Loading branch information
avsej committed Mar 18, 2011
1 parent 59aff59 commit 104e1c8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/git-scribe/check.rb
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions test/check_test.rb
Expand Up @@ -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

0 comments on commit 104e1c8

Please sign in to comment.