[DRE-commits] [SCM] ruby-ronn.git branch, master, updated. upstream/0.7.3-14-g1d73967

Martin Ueding dev at martin-ueding.de
Fri Nov 4 15:45:12 UTC 2011


The following commit has been merged in the master branch:
commit 1d73967aecbd8ad18334ba8f3da2a8cbafe93876
Author: Martin Ueding <dev at martin-ueding.de>
Date:   Fri Nov 4 16:27:31 2011 +0100

    Import Cédric's patch

diff --git a/debian/patches/series b/debian/patches/series
index 8d836c7..6d8bd1c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 not-require-rubygems
+use-correct-interpreter
diff --git a/debian/patches/use-correct-interpreter b/debian/patches/use-correct-interpreter
new file mode 100644
index 0000000..09760d8
--- /dev/null
+++ b/debian/patches/use-correct-interpreter
@@ -0,0 +1,87 @@
+Description: Use the correct interpreter in the unit tests
+
+---
+
+Origin: vendor
+Forwarded: no
+Reviewed-By: Cédric Boutillier <cedric.boutillier at gmail.com> 
+Last-Update: 2011-11-04
+
+--- a/test/test_ronn.rb
++++ b/test/test_ronn.rb
+@@ -5,17 +5,19 @@
+ 
+   # setup PATH so that we execute the right ronn command
+   bindir = File.dirname(testdir) + "/bin"
+-  ENV['PATH'] = "#{bindir}:#{ENV['PATH']}"
++#  ENV['PATH'] = "#{bindir}:#{ENV['PATH']}"
+ 
+   # make sure the load path is setup correctly
+   libdir = File.expand_path("#{testdir}/../lib")
+   $:.unshift(libdir) unless $:.any? { |path| File.expand_path(path) == libdir }
+   ENV['RUBYLIB'] = $:.join(':')
+ 
++  ronn = ENV['RUBY_TEST_BIN'] + " " + bindir + "/ronn"
++
+   require 'ronn'
+ 
+   test "takes ronn text on stdin and produces roff on stdout" do
+-    output = `echo '# hello(1) -- hello world' | ronn --date=2009-11-23`
++    output = `echo '# hello(1) -- hello world' | #{ronn} --date=2009-11-23`
+     lines = output.split("\n")
+     assert_equal 7, lines.size
+     assert_equal %[.\\" generated with Ronn/v#{Ronn::version}], lines.shift
+@@ -37,12 +39,12 @@
+   end
+ 
+   test "produces html instead of roff with the --html argument" do
+-    output = `echo '# hello(1) -- hello world' | ronn --html`
++    output = `echo '# hello(1) -- hello world' | #{ronn} --html`
+     assert_match(/<h2 id='NAME'>NAME<\/h2>/, canonicalize(output))
+   end
+ 
+   test "produces html fragment with the --fragment argument" do
+-    output = `echo '# hello(1) -- hello world' | ronn --fragment`
++    output = `echo '# hello(1) -- hello world' | #{ronn} --fragment`
+     assert_equal [
+       "<div class='mp'>",
+       "<h2 id='NAME'>NAME</h2>",
+@@ -53,17 +55,17 @@
+   end
+ 
+   test "abbides by the RONN_MANUAL environment variable" do
+-    output = `echo '# hello(1) -- hello world' | RONN_MANUAL='Some Manual' ronn --html`
++    output = `echo '# hello(1) -- hello world' | RONN_MANUAL='Some Manual' #{ronn} --html`
+     assert_match(/Some Manual/, output)
+   end
+ 
+   test "abbides by the RONN_DATE environment variable" do
+-    output = `echo '# hello(1) -- hello world' | RONN_DATE=1979-01-01 ronn --html`
++    output = `echo '# hello(1) -- hello world' | RONN_DATE=1979-01-01 #{ronn} --html`
+     assert_match(/January 1979/, output)
+   end
+ 
+   test "abbides by the RONN_ORGANIZATION environment variable" do
+-    output = `echo '# hello(1) -- hello world' | RONN_ORGANIZATION='GitHub' ronn --html`
++    output = `echo '# hello(1) -- hello world' | RONN_ORGANIZATION='GitHub' #{ronn} --html`
+     assert_match(/GitHub/, output)
+   end
+ 
+@@ -73,7 +75,7 @@
+     next unless File.exist?(dest)
+     wrong = dest + '.wrong'
+     test File.basename(source, '.ronn') + ' HTML' do
+-      output = `ronn --pipe --html --fragment #{source}`
++      output = `#{ronn} --pipe --html --fragment #{source}`
+       expected = File.read(dest) rescue ''
+       if expected != output
+         File.open(wrong, 'wb') { |f| f.write(output) }
+@@ -91,7 +93,7 @@
+     next unless File.exist?(dest)
+     wrong = dest + '.wrong'
+     test File.basename(source, '.ronn') + ' roff' do
+-      output = `ronn --pipe --roff --date=1979-01-01 #{source}`.
++      output = `#{ronn} --pipe --roff --date=1979-01-01 #{source}`.
+         split("\n", 4).last # remove ronn version comments
+       expected = File.read(dest) rescue ''
+       if expected != output

-- 
ruby-ronn.git



More information about the Pkg-ruby-extras-commits mailing list