summaryrefslogtreecommitdiff
path: root/test/scanners/coderay_suite.rb
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2008-01-12 18:04:27 +0000
committermurphy <murphy@rubychan.de>2008-01-12 18:04:27 +0000
commit2ec1b9399186f32d36d549eb1f915f9ab4e61647 (patch)
tree51c2070b0487ddaa3747d10aaf083b256c410e39 /test/scanners/coderay_suite.rb
parente127b7d57b06554e708752bbbc2a85e833633c26 (diff)
downloadcoderay-2ec1b9399186f32d36d549eb1f915f9ab4e61647.tar.gz
- fixed a bug in coderay_suite (break outside of loop?)
- made test and bench tasks run with all implementations - included term/ansicolor in lib (will need in some day anyway) as svn:external (this also means that tests will be colorful on all rubys) - incremented CodeRay version number (we're near...)
Diffstat (limited to 'test/scanners/coderay_suite.rb')
-rw-r--r--test/scanners/coderay_suite.rb16
1 files changed, 3 insertions, 13 deletions
diff --git a/test/scanners/coderay_suite.rb b/test/scanners/coderay_suite.rb
index 04b385a..bc00d6c 100644
--- a/test/scanners/coderay_suite.rb
+++ b/test/scanners/coderay_suite.rb
@@ -6,18 +6,8 @@ $:.unshift File.join($mydir, '..', '..', 'lib')
require 'coderay'
debug, $DEBUG = $DEBUG, false
-# Try to load Term::ANSIColor...
-begin
- require 'term-ansicolor'
-rescue LoadError
- begin
- require 'rubygems'
- gem 'term-ansicolor'
- require 'term/ansicolor'
- rescue LoadError
- # ignore
- end
-end unless ENV['nocolor']
+
+require 'term/ansicolor' unless ENV['nocolor']
if defined? Term::ANSIColor
class String
@@ -328,7 +318,7 @@ module CodeRay
rescue
flunk 'highlighting test failed!' unless ENV['noassert']
ok = false
- break
+ return
end
File.open(name + '.actual.html', 'w') { |f| f.write highlighted }
print "\b" * 'highlighting...'.size