summaryrefslogtreecommitdiff
path: root/test/suite.rb
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2006-03-23 00:05:58 +0000
committermurphy <murphy@rubychan.de>2006-03-23 00:05:58 +0000
commit7863986fad84f56ba537ce3714d614c33391fd85 (patch)
treed1fc02f8da8dcb55dd1018203adf18d9b0d31ee7 /test/suite.rb
parent2ee9927772880382e8ab3819805e6e3c62723395 (diff)
downloadcoderay-7863986fad84f56ba537ce3714d614c33391fd85.tar.gz
HTML Encoder: inline numerization corrected.
New demo: demo/demo_html_list.rb. Some demos adjusted. C Scanner: error messages fixed. Rakefile: test_demos now in debug mode. test/suite.rb is using reusable Scanners now.
Diffstat (limited to 'test/suite.rb')
-rw-r--r--test/suite.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/suite.rb b/test/suite.rb
index ef3e2fb..fb50532 100644
--- a/test/suite.rb
+++ b/test/suite.rb
@@ -36,7 +36,7 @@ class CodeRaySuite < TestCase
puts
puts " >> Running #{self.class.name} <<"
puts
- CodeRay::Scanners.load lang
+ scanner = CodeRay::Scanners[lang].new
tokenizer = CodeRay::Encoders[:debug].new
highlighter = CodeRay::Encoders[:html].new(
:tab_width => 2,
@@ -52,7 +52,8 @@ class CodeRaySuite < TestCase
output = name + '.out.' + tokenizer.file_extension
code = File.open(input, 'rb') { |f| break f.read }
- tokens = CodeRay.scan code, lang
+ scanner.string = code
+ tokens = scanner.tokens
result = tokenizer.encode_tokens tokens
highlighted = highlighter.encode_tokens tokens