diff options
author | murphy <murphy@rubychan.de> | 2008-08-11 15:06:35 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2008-08-11 15:06:35 +0000 |
commit | 0e5dd1d44197d1b22ecb1828bbd289a8a3198875 (patch) | |
tree | b8767da4c986beaf4dd457a3260f9c672d306978 /test | |
parent | aaa083a84614e229021a4f75e5707077816dd5f9 (diff) | |
download | coderay-0e5dd1d44197d1b22ecb1828bbd289a8a3198875.tar.gz |
Changed coderay_suite's defaults: 'noassert' option is now 'assert'.
Diffstat (limited to 'test')
-rw-r--r-- | test/scanners/coderay_suite.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/scanners/coderay_suite.rb b/test/scanners/coderay_suite.rb index 1982b34..b417b16 100644 --- a/test/scanners/coderay_suite.rb +++ b/test/scanners/coderay_suite.rb @@ -206,7 +206,7 @@ module CodeRay begin scanner.tokenize rescue - flunk "Random test failed at #{size} #{RUBY_VERSION < '1.9' ? 'bytes' : 'chars'}!" unless ENV['noassert'] + flunk "Random test failed at #{size} #{RUBY_VERSION < '1.9' ? 'bytes' : 'chars'}!" if ENV['assert'] okay = false break end @@ -225,7 +225,7 @@ module CodeRay begin scanner.tokenize rescue - flunk "Incremental test failed at #{size} #{RUBY_VERSION < '1.9' ? 'bytes' : 'chars'}!" unless ENV['noassert'] + flunk "Incremental test failed at #{size} #{RUBY_VERSION < '1.9' ? 'bytes' : 'chars'}!" if ENV['assert'] okay = false break end @@ -245,7 +245,7 @@ module CodeRay begin scanner.tokenize rescue - flunk 'shuffle test failed!' unless ENV['noassert'] + flunk 'shuffle test failed!' if ENV['assert'] okay = false break end @@ -273,9 +273,9 @@ module CodeRay system "EDITOR #{diff}" if ENV['diffed'] end end - unless ENV['noassert'] - assert(ok, "Scan error: unexpected output".red) - end + + assert(ok, "Scan error: unexpected output".red) if ENV['assert'] + print "\b" * 'complete...'.size print 'complete, '.green_or_red(ok) else @@ -294,7 +294,7 @@ module CodeRay else okay = scanner.code == tokens.text unless okay - flunk 'identity test failed!' unless ENV['noassert'] + flunk 'identity test failed!' if ENV['assert'] end okay end @@ -314,7 +314,7 @@ module CodeRay begin highlighted = Highlighter.encode_tokens tokens rescue - flunk 'highlighting test failed!' unless ENV['noassert'] + flunk 'highlighting test failed!' if ENV['assert'] return end File.open(name + '.actual.html', 'w') { |f| f.write highlighted } |