SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
24
textproc/ruby-kramdown/patches/patch-test_run_tests_rb
Normal file
24
textproc/ruby-kramdown/patches/patch-test_run_tests_rb
Normal file
|
@ -0,0 +1,24 @@
|
|||
Fix tests so they run.
|
||||
|
||||
Index: test/run_tests.rb
|
||||
--- test/run_tests.rb.orig
|
||||
+++ test/run_tests.rb
|
||||
@@ -32,9 +32,9 @@ Dir[arg].each {|f| fwidth = [fwidth, f.length + 10].ma
|
||||
html_file = file.sub('.text', '.html')
|
||||
opts_file = file.sub('.text', '.options')
|
||||
opts_file = File.join(File.dirname(file), 'options') unless File.exist?(opts_file)
|
||||
- options = File.exist?(opts_file) ? YAML.safe_load(File.read(opts_file)) : {auto_ids: false, footnote_nr: 1}
|
||||
- doc = Kramdown::Document.new(File.read(file), options)
|
||||
begin
|
||||
+ options = File.exist?(opts_file) ? YAML.safe_load(File.read(opts_file)) : {auto_ids: false, footnote_nr: 1}
|
||||
+ doc = Kramdown::Document.new(File.read(file), options)
|
||||
assert_equal(File.read(html_file), doc.to_html)
|
||||
puts 'PASSED'
|
||||
rescue StandardError
|
||||
@@ -42,5 +42,5 @@ Dir[arg].each {|f| fwidth = [fwidth, f.length + 10].ma
|
||||
puts $!.message if $VERBOSE
|
||||
puts $!.backtrace if $DEBUG
|
||||
end
|
||||
- puts "Warnings:\n" + doc.warnings.join("\n") if !doc.warnings.empty? && $VERBOSE
|
||||
+ puts "Warnings:\n" + doc.warnings.join("\n") if doc && !doc.warnings.empty? && $VERBOSE
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue