summaryrefslogtreecommitdiff
path: root/test/scanners/coderay_suite.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/scanners/coderay_suite.rb')
-rw-r--r--test/scanners/coderay_suite.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/scanners/coderay_suite.rb b/test/scanners/coderay_suite.rb
index 60f71be..3a98c6b 100644
--- a/test/scanners/coderay_suite.rb
+++ b/test/scanners/coderay_suite.rb
@@ -11,6 +11,8 @@ $:.unshift File.join($mydir, '..', 'lib')
require 'term/ansicolor' unless ENV['nocolor']
+require 'test/unit'
+
if defined? Term::ANSIColor
class String
include Term::ANSIColor
@@ -413,6 +415,13 @@ module CodeRay
return false
end
File.open(actual_html, 'w') { |f| f.write highlighted }
+ if okay
+ debug = $DEBUG
+ $DEBUG = false
+ FileUtils.copy(actual_html, name + '.expected.html')
+ $DEBUG = debug
+ end
+ true
end
expected_html = name + '.expected.html'