summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2009-01-11 04:31:20 +0000
committermurphy <murphy@rubychan.de>2009-01-11 04:31:20 +0000
commit558956eaff25fd832ccd3dc5747365bf32cd3825 (patch)
tree6c1e4d2b3d2506009eb6626e7dcd3be736573a4f /test
parent055f73d6ea732ab6b323c884c70dfdb5c991d134 (diff)
downloadcoderay-558956eaff25fd832ccd3dc5747365bf32cd3825.tar.gz
Fixed a bug in Ruby scanner that broke tests with JRuby.
Diffstat (limited to 'test')
-rw-r--r--test/scanners/coderay_suite.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/scanners/coderay_suite.rb b/test/scanners/coderay_suite.rb
index 03c91f6..bdcbdce 100644
--- a/test/scanners/coderay_suite.rb
+++ b/test/scanners/coderay_suite.rb
@@ -251,7 +251,9 @@ module CodeRay
begin
scanner.tokenize
rescue
- flunk "Incremental test failed at #{size} #{RUBY_VERSION < '1.9' ? 'bytes' : 'chars'}!" if ENV['assert']
+ assert_nothing_raised "Incremental test failed at #{size} #{RUBY_VERSION < '1.9' ? 'bytes' : 'chars'}!" do
+ raise
+ end if ENV['assert']
okay = false
break
end
@@ -271,7 +273,9 @@ module CodeRay
begin
scanner.tokenize
rescue
- flunk 'shuffle test failed!' if ENV['assert']
+ assert_nothing_raised 'shuffle test failed!' do
+ raise
+ end if ENV['assert']
okay = false
break
end
@@ -383,7 +387,7 @@ module CodeRay
def check_env_lang
for key in %w(only new)
- if ENV[key] && ENV[key][/^(\w+)\.([\w_]+)$/]
+ if ENV[key] && ENV[key][/^(\w+)\.([-\w_]+)$/]
ENV['lang'] = $1
ENV[key] = $2
end