syntax 0.5.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/data/ruby.css +18 -0
- data/data/xml.css +8 -0
- data/data/yaml.css +12 -0
- data/lib/syntax.rb +8 -1
- data/lib/syntax/common.rb +30 -6
- data/lib/syntax/convertors/abstract.rb +24 -0
- data/lib/syntax/convertors/html.rb +18 -17
- data/lib/syntax/{ruby.rb → lang/ruby.rb} +84 -19
- data/lib/syntax/{xml.rb → lang/xml.rb} +0 -0
- data/lib/syntax/{yaml.rb → lang/yaml.rb} +0 -0
- data/lib/syntax/version.rb +1 -1
- data/test/syntax/tc_ruby.rb +500 -352
- data/test/syntax/tc_xml.rb +2 -2
- data/test/syntax/tc_yaml.rb +2 -2
- data/test/tc_syntax.rb +22 -0
- metadata +14 -8
data/test/syntax/tc_xml.rb
CHANGED
data/test/syntax/tc_yaml.rb
CHANGED
data/test/tc_syntax.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
$:.unshift File.dirname(__FILE__) + "/../lib"
|
2
|
+
require 'syntax'
|
3
|
+
require 'test/unit'
|
4
|
+
|
5
|
+
class TC_Syntax < Test::Unit::TestCase
|
6
|
+
def test_all
|
7
|
+
langs = Syntax.all
|
8
|
+
assert langs.include?("ruby")
|
9
|
+
assert langs.include?("xml")
|
10
|
+
assert langs.include?("yaml")
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_load_bogus
|
14
|
+
lang = Syntax.load "bogus"
|
15
|
+
assert_instance_of Syntax::Default, lang
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_load
|
19
|
+
lang = Syntax.load "ruby"
|
20
|
+
assert_instance_of Syntax::Ruby, lang
|
21
|
+
end
|
22
|
+
end
|
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.8.
|
2
|
+
rubygems_version: 0.8.8
|
3
3
|
specification_version: 1
|
4
4
|
name: syntax
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.
|
7
|
-
date: 2005-
|
6
|
+
version: 0.7.0
|
7
|
+
date: 2005-03-23
|
8
8
|
summary: Syntax is Ruby library for performing simple syntax highlighting.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -27,20 +27,26 @@ platform: ruby
|
|
27
27
|
authors:
|
28
28
|
- Jamis Buck
|
29
29
|
files:
|
30
|
-
-
|
30
|
+
- data/ruby.css
|
31
|
+
- data/xml.css
|
32
|
+
- data/yaml.css
|
31
33
|
- lib/syntax
|
32
|
-
- lib/syntax
|
34
|
+
- lib/syntax.rb
|
33
35
|
- lib/syntax/common.rb
|
34
|
-
- lib/syntax/ruby.rb
|
35
36
|
- lib/syntax/convertors
|
36
|
-
- lib/syntax/
|
37
|
+
- lib/syntax/lang
|
37
38
|
- lib/syntax/version.rb
|
39
|
+
- lib/syntax/convertors/abstract.rb
|
38
40
|
- lib/syntax/convertors/html.rb
|
41
|
+
- lib/syntax/lang/ruby.rb
|
42
|
+
- lib/syntax/lang/xml.rb
|
43
|
+
- lib/syntax/lang/yaml.rb
|
39
44
|
- test/ALL-TESTS.rb
|
40
45
|
- test/syntax
|
41
|
-
- test/
|
46
|
+
- test/tc_syntax.rb
|
42
47
|
- test/syntax/tc_ruby.rb
|
43
48
|
- test/syntax/tc_xml.rb
|
49
|
+
- test/syntax/tc_yaml.rb
|
44
50
|
test_files:
|
45
51
|
- test/ALL-TESTS.rb
|
46
52
|
rdoc_options: []
|