diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-01-22 13:18:01 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-01-22 13:18:01 +0000 |
commit | 144ca23442a5e123935dea4073670d4dba4caa89 (patch) | |
tree | 61c02c4fee71195b09fd7e6270d866a3b2fabd28 /vendor/gems/coderay-0.9.7/test | |
parent | e4faf3553a1b9d22ee171e08f62f112637b05e19 (diff) | |
download | redmine-144ca23442a5e123935dea4073670d4dba4caa89.tar.gz redmine-144ca23442a5e123935dea4073670d4dba4caa89.zip |
Coderay upgraded to 0.9.7 (#5344).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4739 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'vendor/gems/coderay-0.9.7/test')
-rw-r--r-- | vendor/gems/coderay-0.9.7/test/functional/basic.rb | 122 | ||||
-rw-r--r-- | vendor/gems/coderay-0.9.7/test/functional/basic.rbc | 2022 | ||||
-rw-r--r-- | vendor/gems/coderay-0.9.7/test/functional/for_redcloth.rb | 77 | ||||
-rw-r--r-- | vendor/gems/coderay-0.9.7/test/functional/for_redcloth.rbc | 1708 | ||||
-rw-r--r-- | vendor/gems/coderay-0.9.7/test/functional/load_plugin_scanner.rb | 11 | ||||
-rw-r--r-- | vendor/gems/coderay-0.9.7/test/functional/load_plugin_scanner.rbc | 317 | ||||
-rw-r--r-- | vendor/gems/coderay-0.9.7/test/functional/suite.rb | 12 | ||||
-rw-r--r-- | vendor/gems/coderay-0.9.7/test/functional/suite.rbc | 322 | ||||
-rw-r--r-- | vendor/gems/coderay-0.9.7/test/functional/vhdl.rb | 126 | ||||
-rw-r--r-- | vendor/gems/coderay-0.9.7/test/functional/vhdl.rbc | 2334 | ||||
-rw-r--r-- | vendor/gems/coderay-0.9.7/test/functional/word_list.rb | 79 | ||||
-rw-r--r-- | vendor/gems/coderay-0.9.7/test/functional/word_list.rbc | 1763 |
12 files changed, 8893 insertions, 0 deletions
diff --git a/vendor/gems/coderay-0.9.7/test/functional/basic.rb b/vendor/gems/coderay-0.9.7/test/functional/basic.rb new file mode 100644 index 000000000..8ecd3d35f --- /dev/null +++ b/vendor/gems/coderay-0.9.7/test/functional/basic.rb @@ -0,0 +1,122 @@ +require 'test/unit' +require 'coderay' + +class BasicTest < Test::Unit::TestCase + + def test_version + assert_nothing_raised do + assert_match(/\A\d\.\d\.\d\z/, CodeRay::VERSION) + end + end + + RUBY_TEST_CODE = 'puts "Hello, World!"' + + RUBY_TEST_TOKENS = [ + ['puts', :ident], + [' ', :space], + [:open, :string], + ['"', :delimiter], + ['Hello, World!', :content], + ['"', :delimiter], + [:close, :string] + ] + def test_simple_scan + assert_nothing_raised do + assert_equal RUBY_TEST_TOKENS, CodeRay.scan(RUBY_TEST_CODE, :ruby).to_ary + end + end + + RUBY_TEST_HTML = 'puts <span class="s"><span class="dl">"</span>' + + '<span class="k">Hello, World!</span><span class="dl">"</span></span>' + def test_simple_highlight + assert_nothing_raised do + assert_equal RUBY_TEST_HTML, CodeRay.scan(RUBY_TEST_CODE, :ruby).html + end + end + + def test_duo + assert_equal(RUBY_TEST_CODE, + CodeRay::Duo[:plain, :plain].highlight(RUBY_TEST_CODE)) + assert_equal(RUBY_TEST_CODE, + CodeRay::Duo[:plain => :plain].highlight(RUBY_TEST_CODE)) + end + + def test_duo_stream + assert_equal(RUBY_TEST_CODE, + CodeRay::Duo[:plain, :plain].highlight(RUBY_TEST_CODE, :stream => true)) + end + + def test_comment_filter + assert_equal <<-EXPECTED, CodeRay.scan(<<-INPUT, :ruby).comment_filter.text +#!/usr/bin/env ruby + +code + +more code + EXPECTED +#!/usr/bin/env ruby +=begin +A multi-line comment. +=end +code +# A single-line comment. +more code # and another comment, in-line. + INPUT + end + + def test_lines_of_code + assert_equal 2, CodeRay.scan(<<-INPUT, :ruby).lines_of_code +#!/usr/bin/env ruby +=begin +A multi-line comment. +=end +code +# A single-line comment. +more code # and another comment, in-line. + INPUT + rHTML = <<-RHTML +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> + <meta http-equiv="content-type" content="text/html;charset=UTF-8" /> + <title><%= controller.controller_name.titleize %>: <%= controller.action_name %></title> + <%= stylesheet_link_tag 'scaffold' %> +</head> +<body> + +<p style="color: green"><%= flash[:notice] %></p> + +<div id="main"> + <%= yield %> +</div> + +</body> +</html> + RHTML + assert_equal 0, CodeRay.scan(rHTML, :html).lines_of_code + assert_equal 0, CodeRay.scan(rHTML, :php).lines_of_code + assert_equal 0, CodeRay.scan(rHTML, :yaml).lines_of_code + assert_equal 4, CodeRay.scan(rHTML, :rhtml).lines_of_code + end + + def test_rubygems_not_loaded + assert_equal nil, defined? Gem + end if ENV['check_rubygems'] && RUBY_VERSION < '1.9' + + def test_list_of_encoders + assert_kind_of(Array, CodeRay::Encoders.list) + assert CodeRay::Encoders.list.include?('count') + end + + def test_list_of_scanners + assert_kind_of(Array, CodeRay::Scanners.list) + assert CodeRay::Scanners.list.include?('plaintext') + end + + def test_scan_a_frozen_string + CodeRay.scan RUBY_VERSION, :ruby + end + +end diff --git a/vendor/gems/coderay-0.9.7/test/functional/basic.rbc b/vendor/gems/coderay-0.9.7/test/functional/basic.rbc new file mode 100644 index 000000000..1e114cf75 --- /dev/null +++ b/vendor/gems/coderay-0.9.7/test/functional/basic.rbc @@ -0,0 +1,2022 @@ +!RBIX +0 +x +M +1 +n +n +x +10 +__script__ +i +53 +5 +7 +0 +64 +47 +49 +1 +1 +15 +5 +7 +2 +64 +47 +49 +1 +1 +15 +99 +7 +3 +45 +4 +5 +43 +6 +43 +7 +65 +49 +8 +3 +13 +99 +12 +7 +9 +12 +7 +10 +12 +65 +12 +49 +11 +4 +15 +49 +9 +0 +15 +2 +11 +I +6 +I +0 +I +0 +I +0 +n +p +12 +s +9 +test/unit +x +7 +require +s +7 +coderay +x +9 +BasicTest +x +4 +Test +n +x +4 +Unit +x +8 +TestCase +x +10 +open_class +x +14 +__class_init__ +M +1 +n +n +x +9 +BasicTest +i +263 +5 +66 +99 +7 +0 +7 +1 +65 +67 +49 +2 +0 +49 +3 +4 +15 +65 +7 +4 +7 +5 +64 +49 +6 +2 +15 +65 +7 +7 +7 +8 +64 +7 +9 +35 +2 +7 +10 +64 +7 +11 +35 +2 +7 +12 +7 +13 +35 +2 +7 +14 +64 +7 +15 +35 +2 +7 +16 +64 +7 +17 +35 +2 +7 +14 +64 +7 +15 +35 +2 +7 +18 +7 +13 +35 +2 +35 +7 +49 +6 +2 +15 +99 +7 +19 +7 +20 +65 +67 +49 +2 +0 +49 +3 +4 +15 +65 +7 +21 +7 +22 +64 +7 +23 +64 +81 +24 +49 +6 +2 +15 +99 +7 +25 +7 +26 +65 +67 +49 +2 +0 +49 +3 +4 +15 +99 +7 +27 +7 +28 +65 +67 +49 +2 +0 +49 +3 +4 +15 +99 +7 +29 +7 +30 +65 +67 +49 +2 +0 +49 +3 +4 +15 +99 +7 +31 +7 +32 +65 +67 +49 +2 +0 +49 +3 +4 +15 +99 +7 +33 +7 +34 +65 +67 +49 +2 +0 +49 +3 +4 +15 +45 +35 +36 +7 +37 +64 +49 +38 +1 +13 +9 +202 +15 +45 +39 +40 +7 +41 +64 +84 +42 +9 +219 +99 +7 +43 +7 +44 +65 +67 +49 +2 +0 +49 +3 +4 +8 +220 +1 +15 +99 +7 +45 +7 +46 +65 +67 +49 +2 +0 +49 +3 +4 +15 +99 +7 +47 +7 +48 +65 +67 +49 +2 +0 +49 +3 +4 +15 +99 +7 +49 +7 +50 +65 +67 +49 +2 +0 +49 +3 +4 +11 +I +a +I +0 +I +0 +I +0 +n +p +51 +x +12 +test_version +M +1 +n +n +x +12 +test_version +i +8 +5 +56 +0 +47 +50 +1 +0 +11 +I +2 +I +0 +I +0 +I +0 +n +p +2 +M +1 +p +2 +x +9 +for_block +t +n +x +12 +test_version +i +29 +5 +7 +0 +13 +70 +9 +19 +15 +44 +43 +1 +7 +2 +78 +49 +3 +2 +6 +0 +45 +4 +5 +43 +6 +47 +49 +7 +2 +11 +I +5 +I +0 +I +0 +I +0 +I +-2 +p +8 +n +x +6 +Regexp +s +14 +\A\d\.\d\.\d\z +x +3 +new +x +7 +CodeRay +n +x +7 +VERSION +x +12 +assert_match +p +5 +I +0 +I +7 +I +0 +I +8 +I +1d +x +55 +/Users/murphy/ruby/coderay-0.9/test/functional/basic.rb +p +0 +x +21 +assert_nothing_raised +p +5 +I +0 +I +6 +I +0 +I +7 +I +8 +x +55 +/Users/murphy/ruby/coderay-0.9/test/functional/basic.rb +p +0 +x +17 +method_visibility +x +15 +add_defn_method +x +14 +RUBY_TEST_CODE +s +20 +puts "Hello, World!" +x +9 +const_set +x +16 +RUBY_TEST_TOKENS +s +4 +puts +x +5 +ident +s +1 + +x +5 +space +x +4 +open +x +6 +string +s +1 +" +x +9 +delimiter +s +13 +Hello, World! +x +7 +content +x +5 +close +x +16 +test_simple_scan +M +1 +n +n +x +16 +test_simple_scan +i +8 +5 +56 +0 +47 +50 +1 +0 +11 +I +2 +I +0 +I +0 +I +0 +n +p +2 +M +1 +p +2 +x +9 +for_block +t +n +x +16 +test_simple_scan +i +23 +5 +45 +0 +1 +45 +2 +3 +45 +4 +5 +7 +6 +49 +7 +2 +49 +8 +0 +47 +49 +9 +2 +11 +I +6 +I +0 +I +0 +I +0 +I +-2 +p +10 +x +16 +RUBY_TEST_TOKENS +n +x +7 +CodeRay +n +x +14 +RUBY_TEST_CODE +n +x +4 +ruby +x +4 +scan +x +6 +to_ary +x +12 +assert_equal +p +5 +I +0 +I +18 +I +0 +I +19 +I +17 +x +55 +/Users/murphy/ruby/coderay-0.9/test/functional/basic.rb +p +0 +x +21 +assert_nothing_raised +p +5 +I +0 +I +17 +I +0 +I +18 +I +8 +x +55 +/Users/murphy/ruby/coderay-0.9/test/functional/basic.rb +p +0 +x +14 +RUBY_TEST_HTML +s +51 +puts <span class="s"><span class="dl">"</span> +s +73 +<span class="k">Hello, World!</span><span class="dl">"</span></span> +x +1 ++ +x +21 +test_simple_highlight +M +1 +n +n +x +21 +test_simple_highlight +i +8 +5 +56 +0 +47 +50 +1 +0 +11 +I +2 +I +0 +I +0 +I +0 +n +p +2 +M +1 +p +2 +x +9 +for_block +t +n +x +21 +test_simple_highlight +i +23 +5 +45 +0 +1 +45 +2 +3 +45 +4 +5 +7 +6 +49 +7 +2 +49 +8 +0 +47 +49 +9 +2 +11 +I +6 +I +0 +I +0 +I +0 +I +-2 +p +10 +x +14 +RUBY_TEST_HTML +n +x +7 +CodeRay +n +x +14 +RUBY_TEST_CODE +n +x +4 +ruby +x +4 +scan +x +4 +html +x +12 +assert_equal +p +5 +I +0 +I +20 +I +0 +I +21 +I +17 +x +55 +/Users/murphy/ruby/coderay-0.9/test/functional/basic.rb +p +0 +x +21 +assert_nothing_raised +p +5 +I +0 +I +1f +I +0 +I +20 +I +8 +x +55 +/Users/murphy/ruby/coderay-0.9/test/functional/basic.rb +p +0 +x +8 +test_duo +M +1 +n +n +x +8 +test_duo +i +66 +5 +45 +0 +1 +45 +2 +3 +43 +4 +7 +5 +7 +5 +49 +6 +2 +45 +0 +7 +49 +8 +1 +47 +49 +9 +2 +15 +5 +45 +0 +10 +45 +2 +11 +43 +4 +44 +43 +12 +79 +49 +13 +1 +13 +7 +5 +7 +5 +49 +14 +2 +15 +49 +6 +1 +45 +0 +15 +49 +8 +1 +47 +49 +9 +2 +11 +I +7 +I +0 +I +0 +I +0 +n +p +16 +x +14 +RUBY_TEST_CODE +n +x +7 +CodeRay +n +x +3 +Duo +x +5 +plain +x +2 +[] +n +x +9 +highlight +x +12 +assert_equal +n +n +x +4 +Hash +x +16 +new_from_literal +x +3 +[]= +n +p +15 +I +0 +I +25 +I +0 +I +26 +I +4 +I +27 +I +16 +I +26 +I +1b +I +28 +I +1f +I +29 +I +3d +I +28 +I +42 +x +55 +/Users/murphy/ruby/coderay-0.9/test/functional/basic.rb +p +0 +x +15 +test_duo_stream +M +1 +n +n +x +15 +test_duo_stream +i +42 +5 +45 +0 +1 +45 +2 +3 +43 +4 +7 +5 +7 +5 +49 +6 +2 +45 +0 +7 +44 +43 +8 +79 +49 +9 +1 +13 +7 +10 +2 +49 +11 +2 +15 +49 +12 +2 +47 +49 +13 +2 +11 +I +8 +I +0 +I +0 +I +0 +n +p +14 +x +14 +RUBY_TEST_CODE +n +x +7 +CodeRay +n +x +3 +Duo +x +5 +plain +x +2 +[] +n +x +4 +Hash +x +16 +new_from_literal +x +6 +stream +x +3 +[]= +x +9 +highlight +x +12 +assert_equal +p +9 +I +0 +I +2c +I +0 +I +2d +I +4 +I +2e +I +25 +I +2d +I +2a +x +55 +/Users/murphy/ruby/coderay-0.9/test/functional/basic.rb +p +0 +x +19 +test_comment_filter +M +1 +n +n +x +19 +test_comment_filter +i +26 +5 +7 +0 +64 +45 +1 +2 +7 +3 +64 +7 +4 +49 +5 +2 +49 +6 +0 +49 +7 +0 +47 +49 +8 +2 +11 +I +5 +I +0 +I +0 +I +0 +n +p +9 +s +39 +#!/usr/bin/env ruby + +code + +more code + +x +7 +CodeRay +n +s +127 +#!/usr/bin/env ruby +=begin +A multi-line comment. +=end +code +# A single-line comment. +more code # and another comment, in-line. + +x +4 +ruby +x +4 +scan +x +14 +comment_filter +x +4 +text +x +12 +assert_equal +p +5 +I +0 +I +31 +I +0 +I +32 +I +1a +x +55 +/Users/murphy/ruby/coderay-0.9/test/functional/basic.rb +p +0 +x +18 +test_lines_of_code +M +1 +n +n +x +18 +test_lines_of_code +i +108 +5 +80 +45 +0 +1 +7 +2 +64 +7 +3 +49 +4 +2 +49 +5 +0 +47 +49 +6 +2 +15 +7 +7 +64 +19 +0 +15 +5 +78 +45 +0 +8 +20 +0 +7 +9 +49 +4 +2 +49 +5 +0 +47 +49 +6 +2 +15 +5 +78 +45 +0 +10 +20 +0 +7 +11 +49 +4 +2 +49 +5 +0 +47 +49 +6 +2 +15 +5 +78 +45 +0 +12 +20 +0 +7 +13 +49 +4 +2 +49 +5 +0 +47 +49 +6 +2 +15 +5 +4 +4 +45 +0 +14 +20 +0 +7 +15 +49 +4 +2 +49 +5 +0 +47 +49 +6 +2 +11 +I +6 +I +1 +I +0 +I +0 +n +p +16 +x +7 +CodeRay +n +s +127 +#!/usr/bin/env ruby +=begin +A multi-line comment. +=end +code +# A single-line comment. +more code # and another comment, in-line. + +x +4 +ruby +x +4 +scan +x +13 +lines_of_code +x +12 +assert_equal +s +514 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> + <meta http-equiv="content-type" content="text/html;charset=UTF-8" /> + <title><%= controller.controller_name.titleize %>: <%= controller.action_name %></title> + <%= stylesheet_link_tag 'scaffold' %> +</head> +<body> + +<p style="color: green"><%= flash[:notice] %></p> + +<div id="main"> + <%= yield %> +</div> + +</body> +</html> + +n +x +4 +html +n +x +3 +php +n +x +4 +yaml +n +x +5 +rhtml +p +15 +I +0 +I +43 +I +0 +I +44 +I +15 +I +4d +I +1b +I +62 +I +2f +I +63 +I +43 +I +64 +I +57 +I +65 +I +6c +x +55 +/Users/murphy/ruby/coderay-0.9/test/functional/basic.rb +p +1 +x +5 +rHTML +x +3 +ENV +n +s +14 +check_rubygems +x +2 +[] +x +12 +RUBY_VERSION +n +s +3 +1.9 +x +1 +< +x +24 +test_rubygems_not_loaded +M +1 +n +n +x +24 +test_rubygems_not_loaded +i +34 +5 +1 +26 +93 +0 +15 +29 +17 +0 +7 +0 +98 +1 +1 +30 +8 +23 +25 +92 +0 +27 +8 +28 +15 +7 +2 +8 +29 +1 +47 +49 +3 +2 +11 +I +4 +I +0 +I +0 +I +0 +n +p +4 +x +3 +Gem +x +16 +vm_const_defined +s +8 +constant +x +12 +assert_equal +p +5 +I +0 +I +68 +I +0 +I +69 +I +22 +x +55 +/Users/murphy/ruby/coderay-0.9/test/functional/basic.rb +p +0 +x +21 +test_list_of_encoders +M +1 +n +n +x +21 +test_list_of_encoders +i +37 +5 +45 +0 +1 +45 +2 +3 +43 +4 +49 +5 +0 +47 +49 +6 +2 +15 +5 +45 +2 +7 +43 +4 +49 +5 +0 +7 +8 +64 +49 +9 +1 +47 +49 +10 +1 +11 +I +3 +I +0 +I +0 +I +0 +n +p +11 +x +5 +Array +n +x +7 +CodeRay +n +x +8 +Encoders +x +4 +list +x +14 +assert_kind_of +n +s +5 +count +x +8 +include? +x +6 +assert +p +7 +I +0 +I +6c +I +0 +I +6d +I +11 +I +6e +I +25 +x +55 +/Users/murphy/ruby/coderay-0.9/test/functional/basic.rb +p +0 +x +21 +test_list_of_scanners +M +1 +n +n +x +21 +test_list_of_scanners +i +37 +5 +45 +0 +1 +45 +2 +3 +43 +4 +49 +5 +0 +47 +49 +6 +2 +15 +5 +45 +2 +7 +43 +4 +49 +5 +0 +7 +8 +64 +49 +9 +1 +47 +49 +10 +1 +11 +I +3 +I +0 +I +0 +I +0 +n +p +11 +x +5 +Array +n +x +7 +CodeRay +n +x +8 +Scanners +x +4 +list +x +14 +assert_kind_of +n +s +9 +plaintext +x +8 +include? +x +6 +assert +p +7 +I +0 +I +71 +I +0 +I +72 +I +11 +I +73 +I +25 +x +55 +/Users/murphy/ruby/coderay-0.9/test/functional/basic.rb +p +0 +x +25 +test_scan_a_frozen_string +M +1 +n +n +x +25 +test_scan_a_frozen_string +i +12 +45 +0 +1 +45 +2 +3 +7 +4 +49 +5 +2 +11 +I +3 +I +0 +I +0 +I +0 +n +p +6 +x +7 +CodeRay +n +x +12 +RUBY_VERSION +n +x +4 +ruby +x +4 +scan +p +5 +I +0 +I +76 +I +0 +I +77 +I +c +x +55 +/Users/murphy/ruby/coderay-0.9/test/functional/basic.rb +p +0 +p +51 +I +2 +I +6 +I +10 +I +c +I +1a +I +e +I +1d +I +f +I +24 +I +10 +I +2b +I +11 +I +31 +I +12 +I +38 +I +13 +I +3f +I +14 +I +46 +I +15 +I +52 +I +17 +I +60 +I +1d +I +63 +I +1d +I +66 +I +1e +I +6f +I +1f +I +7d +I +25 +I +8b +I +2c +I +99 +I +31 +I +a7 +I +43 +I +b5 +I +6a +I +cc +I +68 +I +db +I +6a +I +dd +I +6c +I +eb +I +71 +I +f9 +I +76 +I +107 +x +55 +/Users/murphy/ruby/coderay-0.9/test/functional/basic.rb +p +0 +x +13 +attach_method +p +7 +I +0 +I +1 +I +9 +I +2 +I +12 +I +4 +I +35 +x +55 +/Users/murphy/ruby/coderay-0.9/test/functional/basic.rb +p +0 diff --git a/vendor/gems/coderay-0.9.7/test/functional/for_redcloth.rb b/vendor/gems/coderay-0.9.7/test/functional/for_redcloth.rb new file mode 100644 index 000000000..efd057821 --- /dev/null +++ b/vendor/gems/coderay-0.9.7/test/functional/for_redcloth.rb @@ -0,0 +1,77 @@ +require 'test/unit' +$:.unshift 'lib' +require 'coderay' + +begin + require 'rubygems' unless defined? Gem + gem 'RedCloth', '>= 4.0.3' rescue nil + require 'redcloth' +rescue LoadError + warn 'RedCloth not found - skipping for_redcloth tests.' +end + +class BasicTest < Test::Unit::TestCase + + def test_for_redcloth + require 'coderay/for_redcloth' + assert_equal "<p><span lang=\"ruby\" class=\"CodeRay\">puts <span style=\"background-color:#fff0f0;color:#D20\"><span style=\"color:#710\">"</span><span style=\"\">Hello, World!</span><span style=\"color:#710\">"</span></span></span></p>", + RedCloth.new('@[ruby]puts "Hello, World!"@').to_html + assert_equal <<-BLOCKCODE.chomp, +<div lang="ruby" class="CodeRay"> + <div class="code"><pre>puts <span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">Hello, World!</span><span style="color:#710">"</span></span></pre></div> +</div> + BLOCKCODE + RedCloth.new('bc[ruby]. puts "Hello, World!"').to_html + end + + def test_for_redcloth_no_lang + require 'coderay/for_redcloth' + assert_equal "<p><code>puts \"Hello, World!\"</code></p>", + RedCloth.new('@puts "Hello, World!"@').to_html + assert_equal <<-BLOCKCODE.chomp, +<pre><code>puts \"Hello, World!\"</code></pre> + BLOCKCODE + RedCloth.new('bc. puts "Hello, World!"').to_html + end + + def test_for_redcloth_style + require 'coderay/for_redcloth' + assert_equal <<-BLOCKCODE.chomp, +<pre style=\"color: red;\"><code style=\"color: red;\">puts \"Hello, World!\"</code></pre> + BLOCKCODE + RedCloth.new('bc{color: red}. puts "Hello, World!"').to_html + end + + def test_for_redcloth_escapes + require 'coderay/for_redcloth' + assert_equal '<p><span lang="ruby" class="CodeRay">></span></p>', + RedCloth.new('@[ruby]>@').to_html + assert_equal <<-BLOCKCODE.chomp, +<div lang="ruby" class="CodeRay"> + <div class="code"><pre>&</pre></div> +</div> + BLOCKCODE + RedCloth.new('bc[ruby]. &').to_html + end + + def test_for_redcloth_escapes2 + require 'coderay/for_redcloth' + assert_equal "<p><span lang=\"c\" class=\"CodeRay\"><span style=\"color:#579\">#include</span> <span style=\"color:#B44;font-weight:bold\"><test.h></span></span></p>", + RedCloth.new('@[c]#include <test.h>@').to_html + end + + # See http://jgarber.lighthouseapp.com/projects/13054/tickets/124-code-markup-does-not-allow-brackets. + def test_for_redcloth_false_positive + require 'coderay/for_redcloth' + assert_equal '<p><code>[project]_dff.skjd</code></p>', + RedCloth.new('@[project]_dff.skjd@').to_html + # false positive, but expected behavior / known issue + assert_equal "<p><span lang=\"ruby\" class=\"CodeRay\">_dff.skjd</span></p>", + RedCloth.new('@[ruby]_dff.skjd@').to_html + assert_equal <<-BLOCKCODE.chomp, +<pre><code>[project]_dff.skjd</code></pre> + BLOCKCODE + RedCloth.new('bc. [project]_dff.skjd').to_html + end + +end if defined? RedCloth
\ No newline at end of file diff --git a/vendor/gems/coderay-0.9.7/test/functional/for_redcloth.rbc b/vendor/gems/coderay-0.9.7/test/functional/for_redcloth.rbc new file mode 100644 index 000000000..09a7fc84c --- /dev/null +++ b/vendor/gems/coderay-0.9.7/test/functional/for_redcloth.rbc @@ -0,0 +1,1708 @@ +!RBIX +0 +x +M +1 +n +n +x +10 +__script__ +i +249 +5 +7 +0 +64 +47 +49 +1 +1 +15 +99 +43 +2 +7 +3 +49 +4 +1 +7 +5 +64 +49 +6 +1 +15 +5 +7 +7 +64 +47 +49 +1 +1 +15 +26 +93 +0 +15 +29 +144 +0 +26 +93 +1 +15 +29 +55 +0 +7 +8 +98 +9 +1 +30 +8 +61 +25 +92 +1 +27 +8 +66 +15 +7 +10 +8 +67 +1 +9 +72 +1 +8 +80 +5 +7 +11 +64 +47 +49 +1 +1 +15 +26 +93 +2 +15 +29 +102 +0 +5 +7 +12 +64 +7 +13 +64 +47 +49 +14 +2 +30 +8 +129 +26 +93 +3 +15 +24 +13 +45 +15 +16 +12 +49 +17 +1 +10 +119 +8 +124 +15 +1 +25 +8 +129 +15 +92 +3 +27 +34 +92 +2 +27 +15 +5 +7 +18 +64 +47 +49 +1 +1 +30 +8 +178 +26 +93 +4 +15 +24 +13 +45 +19 +20 +12 +49 +17 +1 +10 +161 +8 +173 +15 +5 +7 +21 +64 +47 +49 +22 +1 +25 +8 +178 +15 +92 +4 +27 +34 +92 +0 +27 +15 +26 +93 +5 +15 +29 +197 +0 +7 +23 +98 +9 +1 +30 +8 +203 +25 +92 +5 +27 +8 +208 +15 +7 +10 +8 +209 +1 +9 +245 +99 +7 +24 +45 +25 +26 +43 +27 +43 +28 +65 +49 +29 +3 +13 +99 +12 +7 +30 +12 +7 +31 +12 +65 +12 +49 +32 +4 +15 +49 +30 +0 +8 +246 +1 +15 +2 +11 +I +c +I +0 +I +0 +I +0 +n +p +33 +s +9 +test/unit +x +7 +require +x +7 +Globals +x +2 +$: +x +2 +[] +s +3 +lib +x +2 +<< +s +7 +coderay +x +3 +Gem +x +16 +vm_const_defined +s +8 +constant +s +8 +rubygems +s +8 +RedCloth +s +8 +>= 4.0.3 +x +3 +gem +x +13 +StandardError +n +x +3 +=== +s +8 +redcloth +x +9 +LoadError +n +s +49 +RedCloth not found - skipping for_redcloth tests. +x +4 +warn +x +8 +RedCloth +x +9 +BasicTest +x +4 +Test +n +x +4 +Unit +x +8 +TestCase +x +10 +open_class +x +14 +__class_init__ +M +1 +n +n +x +9 +BasicTest +i +86 +5 +66 +99 +7 +0 +7 +1 +65 +67 +49 +2 +0 +49 +3 +4 +15 +99 +7 +4 +7 +5 +65 +67 +49 +2 +0 +49 +3 +4 +15 +99 +7 +6 +7 +7 +65 +67 +49 +2 +0 +49 +3 +4 +15 +99 +7 +8 +7 +9 +65 +67 +49 +2 +0 +49 +3 +4 +15 +99 +7 +10 +7 +11 +65 +67 +49 +2 +0 +49 +3 +4 +15 +99 +7 +12 +7 +13 +65 +67 +49 +2 +0 +49 +3 +4 +11 +I +5 +I +0 +I +0 +I +0 +n +p +14 +x +17 +test_for_redcloth +M +1 +n +n +x +17 +test_for_redcloth +i +96 +5 +7 +0 +64 +47 +49 +1 +1 +15 +5 +7 +2 +64 +45 +3 +4 +13 +71 +5 +47 +9 +37 +47 +49 +6 +0 +13 +7 +7 +64 +47 +49 +8 +1 +15 +8 +43 +7 +7 +64 +49 +5 +1 +49 +9 +0 +47 +49 +10 +2 +15 +5 +7 +11 +64 +49 +12 +0 +45 +3 +13 +13 +71 +5 +47 +9 +82 +47 +49 +6 +0 +13 +7 +14 +64 +47 +49 +8 +1 +15 +8 +88 +7 +14 +64 +49 +5 +1 +49 +9 +0 +47 +49 +10 +2 +11 +I +5 +I +0 +I +0 +I +0 +n +p +15 +s +20 +coderay/for_redcloth +x +7 +require +s +221 +<p><span lang="ruby" class="CodeRay">puts <span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">Hello, World!</span><span style="color:#710">"</span></span></span></p> +x +8 +RedCloth +n +x +3 +new +x +8 +allocate +s +28 +@[ruby]puts "Hello, World!"@ +x +10 +initialize +x +7 +to_html +x +12 +assert_equal +s +252 +<div lang="ruby" class="CodeRay"> + <div class="code"><pre>puts <span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">Hello, World!</span><span style="color:#710">"</span></span></pre></div> +</div> + +x +5 +chomp +n +s +30 +bc[ruby]. puts "Hello, World!" +p +17 +I +0 +I +f +I +0 +I +10 +I +9 +I +11 +I +d +I +12 +I +2e +I +11 +I +33 +I +13 +I +3a +I +18 +I +5b +I +13 +I +60 +x +62 +/Users/murphy/ruby/coderay-0.9/test/functional/for_redcloth.rb +p +0 +x +17 +method_visibility +x +15 +add_defn_method +x +25 +test_for_redcloth_no_lang +M +1 +n +n +x +25 +test_for_redcloth_no_lang +i +96 +5 +7 +0 +64 +47 +49 +1 +1 +15 +5 +7 +2 +64 +45 +3 +4 +13 +71 +5 +47 +9 +37 +47 +49 +6 +0 +13 +7 +7 +64 +47 +49 +8 +1 +15 +8 +43 +7 +7 +64 +49 +5 +1 +49 +9 +0 +47 +49 +10 +2 +15 +5 +7 +11 +64 +49 +12 +0 +45 +3 +13 +13 +71 +5 +47 +9 +82 +47 +49 +6 +0 +13 +7 +14 +64 +47 +49 +8 +1 +15 +8 +88 +7 +14 +64 +49 +5 +1 +49 +9 +0 +47 +49 +10 +2 +11 +I +5 +I +0 +I +0 +I +0 +n +p +15 +s +20 +coderay/for_redcloth +x +7 +require +s +40 +<p><code>puts "Hello, World!"</code></p> +x +8 +RedCloth +n +x +3 +new +x +8 +allocate +s +22 +@puts "Hello, World!"@ +x +10 +initialize +x +7 +to_html +x +12 +assert_equal +s +45 +<pre><code>puts "Hello, World!"</code></pre> + +x +5 +chomp +n +s +24 +bc. puts "Hello, World!" +p +17 +I +0 +I +1b +I +0 +I +1c +I +9 +I +1d +I +d +I +1e +I +2e +I +1d +I +33 +I +1f +I +3a +I +22 +I +5b +I +1f +I +60 +x +62 +/Users/murphy/ruby/coderay-0.9/test/functional/for_redcloth.rb +p +0 +x +23 +test_for_redcloth_style +M +1 +n +n +x +23 +test_for_redcloth_style +i +54 +5 +7 +0 +64 +47 +49 +1 +1 +15 +5 +7 +2 +64 +49 +3 +0 +45 +4 +5 +13 +71 +6 +47 +9 +40 +47 +49 +7 +0 +13 +7 +8 +64 +47 +49 +9 +1 +15 +8 +46 +7 +8 +64 +49 +6 +1 +49 +10 +0 +47 +49 +11 +2 +11 +I +5 +I +0 +I +0 +I +0 +n +p +12 +s +20 +coderay/for_redcloth +x +7 +require +s +85 +<pre style="color: red;"><code style="color: red;">puts "Hello, World!"</code></pre> + +x +5 +chomp +x +8 +RedCloth +n +x +3 +new +x +8 +allocate +s +36 +bc{color: red}. puts "Hello, World!" +x +10 +initialize +x +7 +to_html +x +12 +assert_equal +p +11 +I +0 +I +25 +I +0 +I +26 +I +9 +I +27 +I +10 +I +2a +I +31 +I +27 +I +36 +x +62 +/Users/murphy/ruby/coderay-0.9/test/functional/for_redcloth.rb +p +0 +x +25 +test_for_redcloth_escapes +M +1 +n +n +x +25 +test_for_redcloth_escapes +i +96 +5 +7 +0 +64 +47 +49 +1 +1 +15 +5 +7 +2 +64 +45 +3 +4 +13 +71 +5 +47 +9 +37 +47 +49 +6 +0 +13 +7 +7 +64 +47 +49 +8 +1 +15 +8 +43 +7 +7 +64 +49 +5 +1 +49 +9 +0 +47 +49 +10 +2 +15 +5 +7 +11 +64 +49 +12 +0 +45 +3 +13 +13 +71 +5 +47 +9 +82 +47 +49 +6 +0 +13 +7 +14 +64 +47 +49 +8 +1 +15 +8 +88 +7 +14 +64 +49 +5 +1 +49 +9 +0 +47 +49 +10 +2 +11 +I +5 +I +0 +I +0 +I +0 +n +p +15 +s +20 +coderay/for_redcloth +x +7 +require +s +52 +<p><span lang="ruby" class="CodeRay">></span></p> +x +8 +RedCloth +n +x +3 +new +x +8 +allocate +s +9 +@[ruby]>@ +x +10 +initialize +x +7 +to_html +x +12 +assert_equal +s +84 +<div lang="ruby" class="CodeRay"> + <div class="code"><pre>&</pre></div> +</div> + +x +5 +chomp +n +s +11 +bc[ruby]. & +p +17 +I +0 +I +2d +I +0 +I +2e +I +9 +I +2f +I +d +I +30 +I +2e +I +2f +I +33 +I +31 +I +3a +I +36 +I +5b +I +31 +I +60 +x +62 +/Users/murphy/ruby/coderay-0.9/test/functional/for_redcloth.rb +p +0 +x +26 +test_for_redcloth_escapes2 +M +1 +n +n +x +26 +test_for_redcloth_escapes2 +i +51 +5 +7 +0 +64 +47 +49 +1 +1 +15 +5 +7 +2 +64 +45 +3 +4 +13 +71 +5 +47 +9 +37 +47 +49 +6 +0 +13 +7 +7 +64 +47 +49 +8 +1 +15 +8 +43 +7 +7 +64 +49 +5 +1 +49 +9 +0 +47 +49 +10 +2 +11 +I +5 +I +0 +I +0 +I +0 +n +p +11 +s +20 +coderay/for_redcloth +x +7 +require +s +149 +<p><span lang="c" class="CodeRay"><span style="color:#579">#include</span> <span style="color:#B44;font-weight:bold"><test.h></span></span></p> +x +8 +RedCloth +n +x +3 +new +x +8 +allocate +s +22 +@[c]#include <test.h>@ +x +10 +initialize +x +7 +to_html +x +12 +assert_equal +p +11 +I +0 +I +39 +I +0 +I +3a +I +9 +I +3b +I +d +I +3c +I +2e +I +3b +I +33 +x +62 +/Users/murphy/ruby/coderay-0.9/test/functional/for_redcloth.rb +p +0 +x +32 +test_for_redcloth_false_positive +M +1 +n +n +x +32 +test_for_redcloth_false_positive +i +138 +5 +7 +0 +64 +47 +49 +1 +1 +15 +5 +7 +2 +64 +45 +3 +4 +13 +71 +5 +47 +9 +37 +47 +49 +6 +0 +13 +7 +7 +64 +47 +49 +8 +1 +15 +8 +43 +7 +7 +64 +49 +5 +1 +49 +9 +0 +47 +49 +10 +2 +15 +5 +7 +11 +64 +45 +3 +12 +13 +71 +5 +47 +9 +79 +47 +49 +6 +0 +13 +7 +13 +64 +47 +49 +8 +1 +15 +8 +85 +7 +13 +64 +49 +5 +1 +49 +9 +0 +47 +49 +10 +2 +15 +5 +7 +14 +64 +49 +15 +0 +45 +3 +16 +13 +71 +5 +47 +9 +124 +47 +49 +6 +0 +13 +7 +17 +64 +47 +49 +8 +1 +15 +8 +130 +7 +17 +64 +49 +5 +1 +49 +9 +0 +47 +49 +10 +2 +11 +I +5 +I +0 +I +0 +I +0 +n +p +18 +s +20 +coderay/for_redcloth +x +7 +require +s +38 +<p><code>[project]_dff.skjd</code></p> +x +8 +RedCloth +n +x +3 +new +x +8 +allocate +s +20 +@[project]_dff.skjd@ +x +10 +initialize +x +7 +to_html +x +12 +assert_equal +s +57 +<p><span lang="ruby" class="CodeRay">_dff.skjd</span></p> +n +s +17 +@[ruby]_dff.skjd@ +s +43 +<pre><code>[project]_dff.skjd</code></pre> + +x +5 +chomp +n +s +22 +bc. [project]_dff.skjd +p +23 +I +0 +I +40 +I +0 +I +41 +I +9 +I +42 +I +d +I +43 +I +2e +I +42 +I +33 +I +45 +I +37 +I +46 +I +58 +I +45 +I +5d +I +47 +I +64 +I +4a +I +85 +I +47 +I +8a +x +62 +/Users/murphy/ruby/coderay-0.9/test/functional/for_redcloth.rb +p +0 +p +13 +I +2 +I +f +I +10 +I +1b +I +1e +I +25 +I +2c +I +2d +I +3a +I +39 +I +48 +I +40 +I +56 +x +62 +/Users/murphy/ruby/coderay-0.9/test/functional/for_redcloth.rb +p +0 +x +13 +attach_method +p +23 +I +0 +I +1 +I +9 +I +2 +I +18 +I +3 +I +21 +I +6 +I +51 +I +7 +I +85 +I +8 +I +95 +I +9 +I +a2 +I +a +I +b6 +I +4d +I +d3 +I +d +I +f5 +I +4d +I +f9 +x +62 +/Users/murphy/ruby/coderay-0.9/test/functional/for_redcloth.rb +p +0 diff --git a/vendor/gems/coderay-0.9.7/test/functional/load_plugin_scanner.rb b/vendor/gems/coderay-0.9.7/test/functional/load_plugin_scanner.rb new file mode 100644 index 000000000..25bbc93a6 --- /dev/null +++ b/vendor/gems/coderay-0.9.7/test/functional/load_plugin_scanner.rb @@ -0,0 +1,11 @@ +require 'test/unit' +require 'coderay' + +class PluginScannerTest < Test::Unit::TestCase + + def test_load + require File.join(File.dirname(__FILE__), 'vhdl') + assert_equal 'VHDL', CodeRay.scanner(:vhdl).class.name + end + +end diff --git a/vendor/gems/coderay-0.9.7/test/functional/load_plugin_scanner.rbc b/vendor/gems/coderay-0.9.7/test/functional/load_plugin_scanner.rbc new file mode 100644 index 000000000..ef61d3407 --- /dev/null +++ b/vendor/gems/coderay-0.9.7/test/functional/load_plugin_scanner.rbc @@ -0,0 +1,317 @@ +!RBIX +0 +x +M +1 +n +n +x +10 +__script__ +i +53 +5 +7 +0 +64 +47 +49 +1 +1 +15 +5 +7 +2 +64 +47 +49 +1 +1 +15 +99 +7 +3 +45 +4 +5 +43 +6 +43 +7 +65 +49 +8 +3 +13 +99 +12 +7 +9 +12 +7 +10 +12 +65 +12 +49 +11 +4 +15 +49 +9 +0 +15 +2 +11 +I +6 +I +0 +I +0 +I +0 +n +p +12 +s +9 +test/unit +x +7 +require +s +7 +coderay +x +17 +PluginScannerTest +x +4 +Test +n +x +4 +Unit +x +8 +TestCase +x +10 +open_class +x +14 +__class_init__ +M +1 +n +n +x +17 +PluginScannerTest +i +16 +5 +66 +99 +7 +0 +7 +1 +65 +67 +49 +2 +0 +49 +3 +4 +11 +I +5 +I +0 +I +0 +I +0 +n +p +4 +x +9 +test_load +M +1 +n +n +x +9 +test_load +i +48 +5 +45 +0 +1 +45 +0 +2 +65 +49 +3 +0 +49 +4 +1 +7 +5 +64 +49 +6 +2 +47 +49 +7 +1 +15 +5 +7 +8 +64 +45 +9 +10 +7 +11 +49 +12 +1 +49 +13 +0 +49 +14 +0 +47 +49 +15 +2 +11 +I +4 +I +0 +I +0 +I +0 +n +p +16 +x +4 +File +n +n +x +11 +active_path +x +7 +dirname +s +4 +vhdl +x +4 +join +x +7 +require +s +4 +VHDL +x +7 +CodeRay +n +x +4 +vhdl +x +7 +scanner +x +5 +class +x +4 +name +x +12 +assert_equal +p +7 +I +0 +I +6 +I +0 +I +7 +I +19 +I +8 +I +30 +x +69 +/Users/murphy/ruby/coderay-0.9/test/functional/load_plugin_scanner.rb +p +0 +x +17 +method_visibility +x +15 +add_defn_method +p +3 +I +2 +I +6 +I +10 +x +69 +/Users/murphy/ruby/coderay-0.9/test/functional/load_plugin_scanner.rb +p +0 +x +13 +attach_method +p +7 +I +0 +I +1 +I +9 +I +2 +I +12 +I +4 +I +35 +x +69 +/Users/murphy/ruby/coderay-0.9/test/functional/load_plugin_scanner.rb +p +0 diff --git a/vendor/gems/coderay-0.9.7/test/functional/suite.rb b/vendor/gems/coderay-0.9.7/test/functional/suite.rb new file mode 100644 index 000000000..97dd330d6 --- /dev/null +++ b/vendor/gems/coderay-0.9.7/test/functional/suite.rb @@ -0,0 +1,12 @@ +require 'test/unit' + +MYDIR = File.dirname(__FILE__) + +$:.unshift 'lib' +require 'coderay' +puts "Running basic CodeRay #{CodeRay::VERSION} tests..." + +suite = %w(basic load_plugin_scanner word_list) +for test_case in suite + load File.join(MYDIR, test_case + '.rb') +end diff --git a/vendor/gems/coderay-0.9.7/test/functional/suite.rbc b/vendor/gems/coderay-0.9.7/test/functional/suite.rbc new file mode 100644 index 000000000..977354aec --- /dev/null +++ b/vendor/gems/coderay-0.9.7/test/functional/suite.rbc @@ -0,0 +1,322 @@ +!RBIX +0 +x +M +1 +n +n +x +10 +__script__ +i +95 +5 +7 +0 +64 +47 +49 +1 +1 +15 +65 +7 +2 +45 +3 +4 +65 +49 +5 +0 +49 +6 +1 +49 +7 +2 +15 +99 +43 +8 +7 +9 +49 +10 +1 +7 +11 +64 +49 +12 +1 +15 +5 +7 +13 +64 +47 +49 +1 +1 +15 +5 +7 +14 +45 +15 +16 +43 +17 +47 +49 +18 +0 +7 +19 +63 +3 +47 +49 +20 +1 +15 +7 +21 +64 +7 +22 +64 +7 +23 +64 +35 +3 +19 +0 +15 +20 +0 +56 +24 +50 +25 +0 +15 +2 +11 +I +6 +I +2 +I +0 +I +0 +n +p +26 +s +9 +test/unit +x +7 +require +x +5 +MYDIR +x +4 +File +n +x +11 +active_path +x +7 +dirname +x +9 +const_set +x +7 +Globals +x +2 +$: +x +2 +[] +s +3 +lib +x +2 +<< +s +7 +coderay +s +22 +Running basic CodeRay +x +7 +CodeRay +n +x +7 +VERSION +x +4 +to_s +s +9 + tests... +x +4 +puts +s +5 +basic +s +19 +load_plugin_scanner +s +9 +word_list +M +1 +p +2 +x +9 +for_block +t +n +x +9 +__block__ +i +28 +57 +22 +1 +1 +15 +5 +45 +0 +1 +45 +2 +3 +21 +1 +1 +7 +4 +64 +81 +5 +49 +6 +2 +47 +49 +7 +1 +11 +I +6 +I +0 +I +1 +I +1 +n +p +8 +x +4 +File +n +x +5 +MYDIR +n +s +3 +.rb +x +1 ++ +x +4 +join +x +4 +load +p +5 +I +0 +I +a +I +5 +I +b +I +1c +x +55 +/Users/murphy/ruby/coderay-0.9/test/functional/suite.rb +p +0 +x +4 +each +p +15 +I +0 +I +1 +I +9 +I +3 +I +1a +I +5 +I +29 +I +6 +I +32 +I +7 +I +47 +I +9 +I +55 +I +a +I +5f +x +55 +/Users/murphy/ruby/coderay-0.9/test/functional/suite.rb +p +2 +x +5 +suite +x +9 +test_case diff --git a/vendor/gems/coderay-0.9.7/test/functional/vhdl.rb b/vendor/gems/coderay-0.9.7/test/functional/vhdl.rb new file mode 100644 index 000000000..c7e382436 --- /dev/null +++ b/vendor/gems/coderay-0.9.7/test/functional/vhdl.rb @@ -0,0 +1,126 @@ +class VHDL < CodeRay::Scanners::Scanner + + register_for :vhdl + + RESERVED_WORDS = [ + 'access','after','alias','all','assert','architecture','begin', + 'block','body','buffer','bus','case','component','configuration','constant', + 'disconnect','downto','else','elsif','end','entity','exit','file','for', + 'function','generate','generic','group','guarded','if','impure','in', + 'inertial','inout','is','label','library','linkage','literal','loop', + 'map','new','next','null','of','on','open','others','out','package', + 'port','postponed','procedure','process','pure','range','record','register', + 'reject','report','return','select','severity','signal','shared','subtype', + 'then','to','transport','type','unaffected','units','until','use','variable', + 'wait','when','while','with','note','warning','error','failure','and', + 'or','xor','not','nor', + 'array' + ] + + PREDEFINED_TYPES = [ + 'bit','bit_vector','character','boolean','integer','real','time','string', + 'severity_level','positive','natural','signed','unsigned','line','text', + 'std_logic','std_logic_vector','std_ulogic','std_ulogic_vector','qsim_state', + 'qsim_state_vector','qsim_12state','qsim_12state_vector','qsim_strength', + 'mux_bit','mux_vector','reg_bit','reg_vector','wor_bit','wor_vector' + ] + + PREDEFINED_CONSTANTS = [ + + ] + + IDENT_KIND = CodeRay::CaseIgnoringWordList.new(:ident). + add(RESERVED_WORDS, :reserved). + add(PREDEFINED_TYPES, :pre_type). + add(PREDEFINED_CONSTANTS, :pre_constant) + + ESCAPE = / [rbfntv\n\\'"] | x[a-fA-F0-9]{1,2} | [0-7]{1,3} /x + UNICODE_ESCAPE = / u[a-fA-F0-9]{4} | U[a-fA-F0-9]{8} /x + + def scan_tokens tokens, options + + state = :initial + + until eos? + + kind = nil + match = nil + + case state + + when :initial + + if scan(/ \s+ | \\\n /x) + kind = :space + + elsif scan(/-- .*/x) + kind = :comment + + elsif scan(/ [-+*\/=<>?:;,!&^|()\[\]{}~%]+ | \.(?!\d) /x) + kind = :operator + + elsif match = scan(/ [A-Za-z_][A-Za-z_0-9]* /x) + kind = IDENT_KIND[match.downcase] + + elsif match = scan(/[a-z]?"/i) + tokens << [:open, :string] + state = :string + kind = :delimiter + + elsif scan(/ L?' (?: [^\'\n\\] | \\ #{ESCAPE} )? '? /ox) + kind = :char + + elsif scan(/(?:\d+)(?![.eEfF])/) + kind = :integer + + elsif scan(/\d[fF]?|\d*\.\d+(?:[eE][+-]?\d+)?[fF]?|\d+[eE][+-]?\d+[fF]?/) + kind = :float + + else + getch + kind = :error + + end + + when :string + if scan(/[^\\\n"]+/) + kind = :content + elsif scan(/"/) + tokens << ['"', :delimiter] + tokens << [:close, :string] + state = :initial + next + elsif scan(/ \\ (?: #{ESCAPE} | #{UNICODE_ESCAPE} ) /mox) + kind = :char + elsif scan(/ \\ | $ /x) + tokens << [:close, :string] + kind = :error + state = :initial + else + raise_inspect "else case \" reached; %p not handled." % peek(1), tokens + end + + else + raise_inspect 'Unknown state', tokens + + end + + match ||= matched + if $DEBUG and not kind + raise_inspect 'Error token %p in line %d' % + [[match, kind], line], tokens + end + raise_inspect 'Empty token', tokens unless match + + tokens << [match, kind] + + end + + if state == :string + tokens << [:close, :string] + end + + tokens + end + +end diff --git a/vendor/gems/coderay-0.9.7/test/functional/vhdl.rbc b/vendor/gems/coderay-0.9.7/test/functional/vhdl.rbc new file mode 100644 index 000000000..80d01bf60 --- /dev/null +++ b/vendor/gems/coderay-0.9.7/test/functional/vhdl.rbc @@ -0,0 +1,2334 @@ +!RBIX +0 +x +M +1 +n +n +x +10 +__script__ +i +35 +99 +7 +0 +45 +1 +2 +43 +3 +43 +4 +65 +49 +5 +3 +13 +99 +12 +7 +6 +12 +7 +7 +12 +65 +12 +49 +8 +4 +15 +49 +6 +0 +15 +2 +11 +I +6 +I +0 +I +0 +I +0 +n +p +9 +x +4 +VHDL +x +7 +CodeRay +n +x +8 +Scanners +x +7 +Scanner +x +10 +open_class +x +14 +__class_init__ +M +1 +n +n +x +4 +VHDL +i +519 +5 +66 +5 +7 +0 +47 +49 +1 +1 +15 +65 +7 +2 +7 +3 +64 +7 +4 +64 +7 +5 +64 +7 +6 +64 +7 +7 +64 +7 +8 +64 +7 +9 +64 +7 +10 +64 +7 +11 +64 +7 +12 +64 +7 +13 +64 +7 +14 +64 +7 +15 +64 +7 +16 +64 +7 +17 +64 +7 +18 +64 +7 +19 +64 +7 +20 +64 +7 +21 +64 +7 +22 +64 +7 +23 +64 +7 +24 +64 +7 +25 +64 +7 +26 +64 +7 +27 +64 +7 +28 +64 +7 +29 +64 +7 +30 +64 +7 +31 +64 +7 +32 +64 +7 +33 +64 +7 +34 +64 +7 +35 +64 +7 +36 +64 +7 +37 +64 +7 +38 +64 +7 +39 +64 +7 +40 +64 +7 +41 +64 +7 +42 +64 +7 +43 +64 +7 +44 +64 +7 +45 +64 +7 +46 +64 +7 +47 +64 +7 +48 +64 +7 +49 +64 +7 +50 +64 +7 +51 +64 +7 +52 +64 +7 +53 +64 +7 +54 +64 +7 +55 +64 +7 +56 +64 +7 +57 +64 +7 +58 +64 +7 +59 +64 +7 +60 +64 +7 +61 +64 +7 +62 +64 +7 +63 +64 +7 +64 +64 +7 +65 +64 +7 +66 +64 +7 +67 +64 +7 +68 +64 +7 +69 +64 +7 +70 +64 +7 +71 +64 +7 +72 +64 +7 +73 +64 +7 +74 +64 +7 +75 +64 +7 +76 +64 +7 +77 +64 +7 +78 +64 +7 +79 +64 +7 +80 +64 +7 +81 +64 +7 +82 +64 +7 +83 +64 +7 +84 +64 +7 +85 +64 +7 +86 +64 +7 +87 +64 +7 +88 +64 +7 +89 +64 +7 +90 +64 +7 +91 +64 +35 +89 +49 +92 +2 +15 +65 +7 +93 +7 +94 +64 +7 +95 +64 +7 +96 +64 +7 +97 +64 +7 +98 +64 +7 +99 +64 +7 +100 +64 +7 +101 +64 +7 +102 +64 +7 +103 +64 +7 +104 +64 +7 +105 +64 +7 +106 +64 +7 +107 +64 +7 +108 +64 +7 +109 +64 +7 +110 +64 +7 +111 +64 +7 +112 +64 +7 +113 +64 +7 +114 +64 +7 +115 +64 +7 +116 +64 +7 +117 +64 +7 +118 +64 +7 +119 +64 +7 +120 +64 +7 +121 +64 +7 +122 +64 +7 +123 +64 +35 +30 +49 +92 +2 +15 +65 +7 +124 +35 +0 +49 +92 +2 +15 +65 +7 +125 +45 +126 +127 +43 +128 +13 +71 +129 +47 +9 +422 +47 +49 +130 +0 +13 +7 +131 +47 +49 +132 +1 +15 +8 +427 +7 +131 +49 +129 +1 +45 +2 +133 +7 +134 +49 +135 +2 +45 +93 +136 +7 +137 +49 +135 +2 +45 +124 +138 +7 +139 +49 +135 +2 +49 +92 +2 +15 +65 +7 +140 +7 +141 +13 +70 +9 +476 +15 +44 +43 +142 +7 +143 +80 +49 +129 +2 +6 +141 +49 +92 +2 +15 +65 +7 +144 +7 +145 +13 +70 +9 +501 +15 +44 +43 +142 +7 +146 +80 +49 +129 +2 +6 +145 +49 +92 +2 +15 +99 +7 +147 +7 +148 +65 +67 +49 +149 +0 +49 +150 +4 +11 +I +5b +I +0 +I +0 +I +0 +n +p +151 +x +4 +vhdl +x +12 +register_for +x +14 +RESERVED_WORDS +s +6 +access +s +5 +after +s +5 +alias +s +3 +all +s +6 +assert +s +12 +architecture +s +5 +begin +s +5 +block +s +4 +body +s +6 +buffer +s +3 +bus +s +4 +case +s +9 +component +s +13 +configuration +s +8 +constant +s +10 +disconnect +s +6 +downto +s +4 +else +s +5 +elsif +s +3 +end +s +6 +entity +s +4 +exit +s +4 +file +s +3 +for +s +8 +function +s +8 +generate +s +7 +generic +s +5 +group +s +7 +guarded +s +2 +if +s +6 +impure +s +2 +in +s +8 +inertial +s +5 +inout +s +2 +is +s +5 +label +s +7 +library +s +7 +linkage +s +7 +literal +s +4 +loop +s +3 +map +s +3 +new +s +4 +next +s +4 +null +s +2 +of +s +2 +on +s +4 +open +s +6 +others +s +3 +out +s +7 +package +s +4 +port +s +9 +postponed +s +9 +procedure +s +7 +process +s +4 +pure +s +5 +range +s +6 +record +s +8 +register +s +6 +reject +s +6 +report +s +6 +return +s +6 +select +s +8 +severity +s +6 +signal +s +6 +shared +s +7 +subtype +s +4 +then +s +2 +to +s +9 +transport +s +4 +type +s +10 +unaffected +s +5 +units +s +5 +until +s +3 +use +s +8 +variable +s +4 +wait +s +4 +when +s +5 +while +s +4 +with +s +4 +note +s +7 +warning +s +5 +error +s +7 +failure +s +3 +and +s +2 +or +s +3 +xor +s +3 +not +s +3 +nor +s +5 +array +x +9 +const_set +x +16 +PREDEFINED_TYPES +s +3 +bit +s +10 +bit_vector +s +9 +character +s +7 +boolean +s +7 +integer +s +4 +real +s +4 +time +s +6 +string +s +14 +severity_level +s +8 +positive +s +7 +natural +s +6 +signed +s +8 +unsigned +s +4 +line +s +4 +text +s +9 +std_logic +s +16 +std_logic_vector +s +10 +std_ulogic +s +17 +std_ulogic_vector +s +10 +qsim_state +s +17 +qsim_state_vector +s +12 +qsim_12state +s +19 +qsim_12state_vector +s +13 +qsim_strength +s +7 +mux_bit +s +10 +mux_vector +s +7 +reg_bit +s +10 +reg_vector +s +7 +wor_bit +s +10 +wor_vector +x +20 +PREDEFINED_CONSTANTS +x +10 +IDENT_KIND +x +7 +CodeRay +n +x +20 +CaseIgnoringWordList +x +3 +new +x +8 +allocate +x +5 +ident +x +10 +initialize +n +x +8 +reserved +x +3 +add +n +x +8 +pre_type +n +x +12 +pre_constant +x +6 +ESCAPE +n +x +6 +Regexp +s +49 + [rbfntv\n\\'"] | x[a-fA-F0-9]{1,2} | [0-7]{1,3} +x +14 +UNICODE_ESCAPE +n +s +35 + u[a-fA-F0-9]{4} | U[a-fA-F0-9]{8} +x +11 +scan_tokens +M +1 +n +n +x +11 +scan_tokens +i +688 +7 +0 +19 +2 +15 +5 +47 +49 +1 +0 +10 +660 +1 +19 +3 +15 +1 +19 +4 +15 +20 +2 +13 +7 +0 +12 +49 +2 +1 +9 +331 +15 +5 +7 +3 +13 +70 +9 +51 +15 +44 +43 +4 +7 +5 +80 +49 +6 +2 +6 +3 +47 +49 +7 +1 +9 +63 +7 +8 +19 +3 +8 +329 +5 +7 +9 +13 +70 +9 +82 +15 +44 +43 +4 +7 +10 +80 +49 +6 +2 +6 +9 +47 +49 +7 +1 +9 +94 +7 +11 +19 +3 +8 +329 +5 +7 +12 +13 +70 +9 +113 +15 +44 +43 +4 +7 +13 +80 +49 +6 +2 +6 +12 +47 +49 +7 +1 +9 +125 +7 +14 +19 +3 +8 +329 +5 +7 +15 +13 +70 +9 +144 +15 +44 +43 +4 +7 +16 +80 +49 +6 +2 +6 +15 +47 +49 +7 +1 +19 +4 +9 +167 +45 +17 +18 +20 +4 +49 +19 +0 +49 +20 +1 +19 +3 +8 +329 +5 +7 +21 +13 +70 +9 +186 +15 +44 +43 +4 +7 +22 +79 +49 +6 +2 +6 +21 +47 +49 +7 +1 +19 +4 +9 +217 +20 +0 +7 +23 +7 +24 +35 +2 +49 +25 +1 +15 +7 +24 +19 +2 +15 +7 +26 +19 +3 +8 +329 +5 +7 +27 +13 +70 +9 +247 +15 +44 +43 +4 +7 +28 +45 +29 +30 +47 +49 +31 +0 +7 +32 +63 +3 +80 +49 +6 +2 +6 +27 +47 +49 +7 +1 +9 +259 +7 +33 +19 +3 +8 +329 +5 +7 +34 +13 +70 +9 +278 +15 +44 +43 +4 +7 +35 +78 +49 +6 +2 +6 +34 +47 +49 +7 +1 +9 +290 +7 +36 +19 +3 +8 +329 +5 +7 +37 +13 +70 +9 +309 +15 +44 +43 +4 +7 +38 +78 +49 +6 +2 +6 +37 +47 +49 +7 +1 +9 +321 +7 +39 +19 +3 +8 +329 +5 +48 +40 +15 +7 +41 +19 +3 +8 +564 +13 +7 +24 +12 +49 +2 +1 +9 +553 +15 +5 +7 +42 +13 +70 +9 +360 +15 +44 +43 +4 +7 +43 +78 +49 +6 +2 +6 +42 +47 +49 +7 +1 +9 +372 +7 +44 +19 +3 +8 +551 +5 +7 +45 +13 +70 +9 +391 +15 +44 +43 +4 +7 +46 +78 +49 +6 +2 +6 +45 +47 +49 +7 +1 +9 +432 +20 +0 +7 +46 +64 +7 +26 +35 +2 +49 +25 +1 +15 +20 +0 +7 +47 +7 +24 +35 +2 +49 +25 +1 +15 +7 +0 +19 +2 +15 +1 +8 +656 +8 +551 +5 +7 +48 +13 +70 +9 +472 +15 +44 +43 +4 +7 +49 +45 +29 +50 +47 +49 +31 +0 +7 +51 +45 +52 +53 +47 +49 +31 +0 +7 +54 +63 +5 +4 +6 +49 +6 +2 +6 +48 +47 +49 +7 +1 +9 +484 +7 +33 +19 +3 +8 +551 +5 +7 +55 +13 +70 +9 +503 +15 +44 +43 +4 +7 +56 +80 +49 +6 +2 +6 +55 +47 +49 +7 +1 +9 +532 +20 +0 +7 +47 +7 +24 +35 +2 +49 +25 +1 +15 +7 +41 +19 +3 +15 +7 +0 +19 +2 +8 +551 +5 +7 +57 +64 +5 +79 +47 +49 +58 +1 +49 +59 +1 +20 +0 +47 +49 +60 +2 +8 +564 +15 +5 +7 +61 +64 +20 +0 +47 +49 +60 +2 +15 +20 +4 +13 +10 +576 +15 +5 +48 +62 +19 +4 +15 +99 +43 +63 +7 +64 +49 +20 +1 +13 +9 +597 +15 +20 +3 +10 +596 +2 +8 +597 +3 +9 +625 +5 +7 +65 +64 +20 +4 +20 +3 +35 +2 +5 +48 +66 +35 +2 +49 +59 +1 +20 +0 +47 +49 +60 +2 +8 +626 +1 +15 +20 +4 +9 +634 +1 +8 +644 +5 +7 +67 +64 +20 +0 +47 +49 +60 +2 +15 +20 +0 +20 +4 +20 +3 +35 +2 +49 +25 +1 +15 +68 +8 +5 +1 +15 +20 +2 +7 +24 +83 +68 +9 +683 +20 +0 +7 +47 +7 +24 +35 +2 +49 +25 +1 +8 +684 +1 +15 +20 +0 +11 +I +c +I +5 +I +2 +I +2 +n +p +69 +x +7 +initial +x +4 +eos? +x +3 +=== +n +x +6 +Regexp +s +12 + \s+ | \\\n +x +3 +new +x +4 +scan +x +5 +space +n +s +5 +-- .* +x +7 +comment +n +s +42 + [-+*\/=<>?:;,!&^|()\[\]{}~%]+ | \.(?!\d) +x +8 +operator +n +s +24 + [A-Za-z_][A-Za-z_0-9]* +x +10 +IDENT_KIND +n +x +8 +downcase +x +2 +[] +n +s +7 +[a-z]?" +x +4 +open +x +6 +string +x +2 +<< +x +9 +delimiter +n +s +24 + L?' (?: [^\'\n\\] | \\ +x +6 +ESCAPE +n +x +4 +to_s +s +7 + )? '? +x +4 +char +n +s +18 +(?:\d+)(?![.eEfF]) +x +7 +integer +n +s +59 +\d[fF]?|\d*\.\d+(?:[eE][+-]?\d+)?[fF]?|\d+[eE][+-]?\d+[fF]? +x +5 +float +x +5 +getch +x +5 +error +n +s +9 +[^\\\n"]+ +x +7 +content +n +s +1 +" +x +5 +close +n +s +8 + \\ (?: +n +s +3 + | +x +14 +UNICODE_ESCAPE +n +s +3 + ) +n +s +8 + \\ | $ +s +36 +else case " reached; %p not handled. +x +4 +peek +x +1 +% +x +13 +raise_inspect +s +13 +Unknown state +x +7 +matched +x +7 +Globals +x +6 +$DEBUG +s +25 +Error token %p in line %d +x +4 +line +s +11 +Empty token +x +2 +== +p +111 +I +0 +I +28 +I +0 +I +2a +I +5 +I +2c +I +c +I +2e +I +10 +I +2f +I +14 +I +31 +I +17 +I +33 +I +20 +I +35 +I +39 +I +36 +I +3f +I +38 +I +58 +I +39 +I +5e +I +3b +I +77 +I +3c +I +7d +I +3e +I +98 +I +3f +I +a7 +I +41 +I +c2 +I +42 +I +ce +I +43 +I +d3 +I +44 +I +d9 +I +46 +I +fd +I +47 +I +103 +I +49 +I +11c +I +4a +I +122 +I +4c +I +13b +I +4d +I +141 +I +50 +I +145 +I +51 +I +14c +I +55 +I +155 +I +56 +I +16e +I +57 +I +174 +I +58 +I +18d +I +59 +I +19a +I +5a +I +1a6 +I +5b +I +1ab +I +5c +I +1b0 +I +5d +I +1de +I +5e +I +1e4 +I +5f +I +1fd +I +60 +I +209 +I +61 +I +20e +I +62 +I +214 +I +64 +I +22a +I +68 +I +235 +I +6c +I +241 +I +6d +I +257 +I +6f +I +258 +I +6e +I +25b +I +6f +I +271 +I +6d +I +273 +I +71 +I +285 +I +73 +I +296 +I +77 +I +29e +I +78 +I +2ab +I +77 +I +2ad +I +7b +I +2b0 +x +54 +/Users/murphy/ruby/coderay-0.9/test/functional/vhdl.rb +p +5 +x +6 +tokens +x +7 +options +x +5 +state +x +4 +kind +x +5 +match +x +17 +method_visibility +x +15 +add_defn_method +p +65 +I +2 +I +3 +I +a +I +5 +I +d +I +6 +I +22 +I +7 +I +3a +I +8 +I +55 +I +9 +I +6d +I +a +I +85 +I +b +I +a3 +I +c +I +bb +I +d +I +d3 +I +e +I +ee +I +f +I +109 +I +10 +I +115 +I +11 +I +11e +I +14 +I +121 +I +15 +I +139 +I +16 +I +14e +I +17 +I +15d +I +18 +I +169 +I +19 +I +181 +I +1c +I +184 +I +1e +I +18a +I +20 +I +1ab +I +21 +I +1b0 +I +20 +I +1b3 +I +22 +I +1b8 +I +20 +I +1bb +I +23 +I +1c0 +I +20 +I +1c7 +I +25 +I +1e0 +I +26 +I +1f9 +I +28 +I +207 +x +54 +/Users/murphy/ruby/coderay-0.9/test/functional/vhdl.rb +p +0 +x +13 +attach_method +p +3 +I +0 +I +1 +I +23 +x +54 +/Users/murphy/ruby/coderay-0.9/test/functional/vhdl.rb +p +0 diff --git a/vendor/gems/coderay-0.9.7/test/functional/word_list.rb b/vendor/gems/coderay-0.9.7/test/functional/word_list.rb new file mode 100644 index 000000000..84d6e9e79 --- /dev/null +++ b/vendor/gems/coderay-0.9.7/test/functional/word_list.rb @@ -0,0 +1,79 @@ +require 'test/unit' +require 'coderay' + +class WordListTest < Test::Unit::TestCase + + include CodeRay + + # define word arrays + RESERVED_WORDS = %w[ + asm break case continue default do else + ... + ] + + PREDEFINED_TYPES = %w[ + int long short char void + ... + ] + + PREDEFINED_CONSTANTS = %w[ + EOF NULL ... + ] + + # make a WordList + IDENT_KIND = WordList.new(:ident). + add(RESERVED_WORDS, :reserved). + add(PREDEFINED_TYPES, :pre_type). + add(PREDEFINED_CONSTANTS, :pre_constant) + + def test_word_list_example + assert_equal :pre_type, IDENT_KIND['void'] + # assert_equal :pre_constant, IDENT_KIND['...'] # not specified + end + + def test_word_list + list = WordList.new(:ident).add(['foobar'], :reserved) + assert_equal :reserved, list['foobar'] + assert_equal :ident, list['FooBar'] + end + + def test_word_list_cached + list = WordList.new(:ident, true).add(['foobar'], :reserved) + assert_equal :reserved, list['foobar'] + assert_equal :ident, list['FooBar'] + end + + def test_case_ignoring_word_list + list = CaseIgnoringWordList.new(:ident).add(['foobar'], :reserved) + assert_equal :ident, list['foo'] + assert_equal :reserved, list['foobar'] + assert_equal :reserved, list['FooBar'] + + list = CaseIgnoringWordList.new(:ident).add(['FooBar'], :reserved) + assert_equal :ident, list['foo'] + assert_equal :reserved, list['foobar'] + assert_equal :reserved, list['FooBar'] + end + + def test_case_ignoring_word_list_cached + list = CaseIgnoringWordList.new(:ident, true).add(['foobar'], :reserved) + assert_equal :ident, list['foo'] + assert_equal :reserved, list['foobar'] + assert_equal :reserved, list['FooBar'] + + list = CaseIgnoringWordList.new(:ident, true).add(['FooBar'], :reserved) + assert_equal :ident, list['foo'] + assert_equal :reserved, list['foobar'] + assert_equal :reserved, list['FooBar'] + end + + def test_dup + list = WordList.new(:ident).add(['foobar'], :reserved) + assert_equal :reserved, list['foobar'] + list2 = list.dup + list2.add(%w[foobar], :keyword) + assert_equal :keyword, list2['foobar'] + assert_equal :reserved, list['foobar'] + end + +end
\ No newline at end of file diff --git a/vendor/gems/coderay-0.9.7/test/functional/word_list.rbc b/vendor/gems/coderay-0.9.7/test/functional/word_list.rbc new file mode 100644 index 000000000..37bcdd28a --- /dev/null +++ b/vendor/gems/coderay-0.9.7/test/functional/word_list.rbc @@ -0,0 +1,1763 @@ +!RBIX +0 +x +M +1 +n +n +x +10 +__script__ +i +53 +5 +7 +0 +64 +47 +49 +1 +1 +15 +5 +7 +2 +64 +47 +49 +1 +1 +15 +99 +7 +3 +45 +4 +5 +43 +6 +43 +7 +65 +49 +8 +3 +13 +99 +12 +7 +9 +12 +7 +10 +12 +65 +12 +49 +11 +4 +15 +49 +9 +0 +15 +2 +11 +I +6 +I +0 +I +0 +I +0 +n +p +12 +s +9 +test/unit +x +7 +require +s +7 +coderay +x +12 +WordListTest +x +4 +Test +n +x +4 +Unit +x +8 +TestCase +x +10 +open_class +x +14 +__class_init__ +M +1 +n +n +x +12 +WordListTest +i +232 +5 +66 +5 +45 +0 +1 +47 +49 +2 +1 +15 +65 +7 +3 +7 +4 +64 +7 +5 +64 +7 +6 +64 +7 +7 +64 +7 +8 +64 +7 +9 +64 +7 +10 +64 +7 +11 +64 +35 +8 +49 +12 +2 +15 +65 +7 +13 +7 +14 +64 +7 +15 +64 +7 +16 +64 +7 +17 +64 +7 +18 +64 +7 +11 +64 +35 +6 +49 +12 +2 +15 +65 +7 +19 +7 +20 +64 +7 +21 +64 +7 +11 +64 +35 +3 +49 +12 +2 +15 +65 +7 +22 +45 +23 +24 +13 +71 +25 +47 +9 +115 +47 +49 +26 +0 +13 +7 +27 +47 +49 +28 +1 +15 +8 +120 +7 +27 +49 +25 +1 +45 +3 +29 +7 +30 +49 +31 +2 +45 +13 +32 +7 +33 +49 +31 +2 +45 +19 +34 +7 +35 +49 +31 +2 +49 +12 +2 +15 +99 +7 +36 +7 +37 +65 +67 +49 +38 +0 +49 +39 +4 +15 +99 +7 +40 +7 +41 +65 +67 +49 +38 +0 +49 +39 +4 +15 +99 +7 +42 +7 +43 +65 +67 +49 +38 +0 +49 +39 +4 +15 +99 +7 +44 +7 +45 +65 +67 +49 +38 +0 +49 +39 +4 +15 +99 +7 +46 +7 +47 +65 +67 +49 +38 +0 +49 +39 +4 +15 +99 +7 +48 +7 +49 +65 +67 +49 +38 +0 +49 +39 +4 +11 +I +a +I +0 +I +0 +I +0 +n +p +50 +x +7 +CodeRay +n +x +7 +include +x +14 +RESERVED_WORDS +s +3 +asm +s +5 +break +s +4 +case +s +8 +continue +s +7 +default +s +2 +do +s +4 +else +s +3 +... +x +9 +const_set +x +16 +PREDEFINED_TYPES +s +3 +int +s +4 +long +s +5 +short +s +4 +char +s +4 +void +x +20 +PREDEFINED_CONSTANTS +s +3 +EOF +s +4 +NULL +x +10 +IDENT_KIND +x +8 +WordList +n +x +3 +new +x +8 +allocate +x +5 +ident +x +10 +initialize +n +x +8 +reserved +x +3 +add +n +x +8 +pre_type +n +x +12 +pre_constant +x +22 +test_word_list_example +M +1 +n +n +x +22 +test_word_list_example +i +17 +5 +7 +0 +45 +1 +2 +7 +3 +64 +49 +4 +1 +47 +49 +5 +2 +11 +I +4 +I +0 +I +0 +I +0 +n +p +6 +x +8 +pre_type +x +10 +IDENT_KIND +n +s +4 +void +x +2 +[] +x +12 +assert_equal +p +5 +I +0 +I +1d +I +0 +I +1e +I +11 +x +59 +/Users/murphy/ruby/coderay-0.9/test/functional/word_list.rb +p +0 +x +17 +method_visibility +x +15 +add_defn_method +x +14 +test_word_list +M +1 +n +n +x +14 +test_word_list +i +73 +45 +0 +1 +13 +71 +2 +47 +9 +23 +47 +49 +3 +0 +13 +7 +4 +47 +49 +5 +1 +15 +8 +28 +7 +4 +49 +2 +1 +7 +6 +64 +35 +1 +7 +7 +49 +8 +2 +19 +0 +15 +5 +7 +7 +20 +0 +7 +6 +64 +49 +9 +1 +47 +49 +10 +2 +15 +5 +7 +4 +20 +0 +7 +11 +64 +49 +9 +1 +47 +49 +10 +2 +11 +I +5 +I +1 +I +0 +I +0 +n +p +12 +x +8 +WordList +n +x +3 +new +x +8 +allocate +x +5 +ident +x +10 +initialize +s +6 +foobar +x +8 +reserved +x +3 +add +x +2 +[] +x +12 +assert_equal +s +6 +FooBar +p +9 +I +0 +I +22 +I +0 +I +23 +I +29 +I +24 +I +39 +I +25 +I +49 +x +59 +/Users/murphy/ruby/coderay-0.9/test/functional/word_list.rb +p +1 +x +4 +list +x +21 +test_word_list_cached +M +1 +n +n +x +21 +test_word_list_cached +i +75 +45 +0 +1 +13 +71 +2 +47 +9 +24 +47 +49 +3 +0 +13 +7 +4 +2 +47 +49 +5 +2 +15 +8 +30 +7 +4 +2 +49 +2 +2 +7 +6 +64 +35 +1 +7 +7 +49 +8 +2 +19 +0 +15 +5 +7 +7 +20 +0 +7 +6 +64 +49 +9 +1 +47 +49 +10 +2 +15 +5 +7 +4 +20 +0 +7 +11 +64 +49 +9 +1 +47 +49 +10 +2 +11 +I +5 +I +1 +I +0 +I +0 +n +p +12 +x +8 +WordList +n +x +3 +new +x +8 +allocate +x +5 +ident +x +10 +initialize +s +6 +foobar +x +8 +reserved +x +3 +add +x +2 +[] +x +12 +assert_equal +s +6 +FooBar +p +9 +I +0 +I +28 +I +0 +I +29 +I +2b +I +2a +I +3b +I +2b +I +4b +x +59 +/Users/murphy/ruby/coderay-0.9/test/functional/word_list.rb +p +1 +x +4 +list +x +28 +test_case_ignoring_word_list +M +1 +n +n +x +28 +test_case_ignoring_word_list +i +178 +45 +0 +1 +13 +71 +2 +47 +9 +23 +47 +49 +3 +0 +13 +7 +4 +47 +49 +5 +1 +15 +8 +28 +7 +4 +49 +2 +1 +7 +6 +64 +35 +1 +7 +7 +49 +8 +2 +19 +0 +15 +5 +7 +4 +20 +0 +7 +9 +64 +49 +10 +1 +47 +49 +11 +2 +15 +5 +7 +7 +20 +0 +7 +6 +64 +49 +10 +1 +47 +49 +11 +2 +15 +5 +7 +7 +20 +0 +7 +12 +64 +49 +10 +1 +47 +49 +11 +2 +15 +45 +0 +13 +13 +71 +2 +47 +9 +112 +47 +49 +3 +0 +13 +7 +4 +47 +49 +5 +1 +15 +8 +117 +7 +4 +49 +2 +1 +7 +12 +64 +35 +1 +7 +7 +49 +8 +2 +19 +0 +15 +5 +7 +4 +20 +0 +7 +9 +64 +49 +10 +1 +47 +49 +11 +2 +15 +5 +7 +7 +20 +0 +7 +6 +64 +49 +10 +1 +47 +49 +11 +2 +15 +5 +7 +7 +20 +0 +7 +12 +64 +49 +10 +1 +47 +49 +11 +2 +11 +I +5 +I +1 +I +0 +I +0 +n +p +14 +x +20 +CaseIgnoringWordList +n +x +3 +new +x +8 +allocate +x +5 +ident +x +10 +initialize +s +6 +foobar +x +8 +reserved +x +3 +add +s +3 +foo +x +2 +[] +x +12 +assert_equal +s +6 +FooBar +n +p +19 +I +0 +I +2e +I +0 +I +2f +I +29 +I +30 +I +39 +I +31 +I +49 +I +32 +I +59 +I +34 +I +82 +I +35 +I +92 +I +36 +I +a2 +I +37 +I +b2 +x +59 +/Users/murphy/ruby/coderay-0.9/test/functional/word_list.rb +p +1 +x +4 +list +x +35 +test_case_ignoring_word_list_cached +M +1 +n +n +x +35 +test_case_ignoring_word_list_cached +i +182 +45 +0 +1 +13 +71 +2 +47 +9 +24 +47 +49 +3 +0 +13 +7 +4 +2 +47 +49 +5 +2 +15 +8 +30 +7 +4 +2 +49 +2 +2 +7 +6 +64 +35 +1 +7 +7 +49 +8 +2 +19 +0 +15 +5 +7 +4 +20 +0 +7 +9 +64 +49 +10 +1 +47 +49 +11 +2 +15 +5 +7 +7 +20 +0 +7 +6 +64 +49 +10 +1 +47 +49 +11 +2 +15 +5 +7 +7 +20 +0 +7 +12 +64 +49 +10 +1 +47 +49 +11 +2 +15 +45 +0 +13 +13 +71 +2 +47 +9 +115 +47 +49 +3 +0 +13 +7 +4 +2 +47 +49 +5 +2 +15 +8 +121 +7 +4 +2 +49 +2 +2 +7 +12 +64 +35 +1 +7 +7 +49 +8 +2 +19 +0 +15 +5 +7 +4 +20 +0 +7 +9 +64 +49 +10 +1 +47 +49 +11 +2 +15 +5 +7 +7 +20 +0 +7 +6 +64 +49 +10 +1 +47 +49 +11 +2 +15 +5 +7 +7 +20 +0 +7 +12 +64 +49 +10 +1 +47 +49 +11 +2 +11 +I +5 +I +1 +I +0 +I +0 +n +p +14 +x +20 +CaseIgnoringWordList +n +x +3 +new +x +8 +allocate +x +5 +ident +x +10 +initialize +s +6 +foobar +x +8 +reserved +x +3 +add +s +3 +foo +x +2 +[] +x +12 +assert_equal +s +6 +FooBar +n +p +19 +I +0 +I +3a +I +0 +I +3b +I +2b +I +3c +I +3b +I +3d +I +4b +I +3e +I +5b +I +40 +I +86 +I +41 +I +96 +I +42 +I +a6 +I +43 +I +b6 +x +59 +/Users/murphy/ruby/coderay-0.9/test/functional/word_list.rb +p +1 +x +4 +list +x +8 +test_dup +M +1 +n +n +x +8 +test_dup +i +110 +45 +0 +1 +13 +71 +2 +47 +9 +23 +47 +49 +3 +0 +13 +7 +4 +47 +49 +5 +1 +15 +8 +28 +7 +4 +49 +2 +1 +7 +6 +64 +35 +1 +7 +7 +49 +8 +2 +19 +0 +15 +5 +7 +7 +20 +0 +7 +6 +64 +49 +9 +1 +47 +49 +10 +2 +15 +20 +0 +49 +11 +0 +19 +1 +15 +20 +1 +7 +6 +64 +35 +1 +7 +12 +49 +8 +2 +15 +5 +7 +12 +20 +1 +7 +6 +64 +49 +9 +1 +47 +49 +10 +2 +15 +5 +7 +7 +20 +0 +7 +6 +64 +49 +9 +1 +47 +49 +10 +2 +11 +I +6 +I +2 +I +0 +I +0 +n +p +13 +x +8 +WordList +n +x +3 +new +x +8 +allocate +x +5 +ident +x +10 +initialize +s +6 +foobar +x +8 +reserved +x +3 +add +x +2 +[] +x +12 +assert_equal +x +3 +dup +x +7 +keyword +p +15 +I +0 +I +46 +I +0 +I +47 +I +29 +I +48 +I +39 +I +49 +I +41 +I +4a +I +4e +I +4b +I +5e +I +4c +I +6e +x +59 +/Users/murphy/ruby/coderay-0.9/test/functional/word_list.rb +p +2 +x +4 +list +x +5 +list2 +p +45 +I +2 +I +6 +I +b +I +9 +I +e +I +a +I +23 +I +b +I +2c +I +e +I +2f +I +f +I +3e +I +10 +I +47 +I +13 +I +4a +I +14 +I +59 +I +18 +I +78 +I +19 +I +7d +I +18 +I +80 +I +1a +I +85 +I +18 +I +88 +I +1b +I +8d +I +18 +I +94 +I +1d +I +a2 +I +22 +I +b0 +I +28 +I +be +I +2e +I +cc +I +3a +I +da +I +46 +I +e8 +x +59 +/Users/murphy/ruby/coderay-0.9/test/functional/word_list.rb +p +0 +x +13 +attach_method +p +7 +I +0 +I +1 +I +9 +I +2 +I +12 +I +4 +I +35 +x +59 +/Users/murphy/ruby/coderay-0.9/test/functional/word_list.rb +p +0 |