regexp_parser 0.3.4 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +6 -0
- data/lib/regexp_parser/syntax/ruby/1.9.1.rb +1 -1
- data/lib/regexp_parser/syntax/tokens/escape.rb +2 -0
- data/lib/regexp_parser/version.rb +1 -1
- data/test/expression/test_base.rb +32 -34
- data/test/expression/test_clone.rb +49 -47
- data/test/expression/test_conditionals.rb +40 -40
- data/test/expression/test_free_space.rb +4 -2
- data/test/expression/test_set.rb +16 -16
- data/test/expression/test_strfregexp.rb +74 -74
- data/test/expression/test_subexpression.rb +2 -2
- data/test/expression/test_tests.rb +57 -57
- data/test/expression/test_to_h.rb +11 -6
- data/test/expression/test_to_s.rb +22 -15
- data/test/expression/test_traverse.rb +26 -29
- data/test/lexer/test_all.rb +9 -7
- data/test/lexer/test_conditionals.rb +35 -11
- data/test/lexer/test_keep.rb +6 -6
- data/test/lexer/test_literals.rb +20 -10
- data/test/lexer/test_nesting.rb +14 -7
- data/test/lexer/test_refcalls.rb +12 -5
- data/test/parser/test_all.rb +15 -13
- data/test/parser/test_alternation.rb +29 -26
- data/test/parser/test_anchors.rb +7 -8
- data/test/parser/test_conditionals.rb +43 -41
- data/test/parser/test_escapes.rb +18 -16
- data/test/parser/test_free_space.rb +33 -33
- data/test/parser/test_groups.rb +46 -46
- data/test/parser/test_keep.rb +4 -4
- data/test/parser/test_properties.rb +18 -16
- data/test/parser/test_quantifiers.rb +184 -163
- data/test/parser/test_refcalls.rb +48 -32
- data/test/parser/test_sets.rb +102 -88
- data/test/parser/test_types.rb +7 -8
- data/test/scanner/test_all.rb +6 -4
- data/test/scanner/test_anchors.rb +8 -5
- data/test/scanner/test_conditionals.rb +38 -20
- data/test/scanner/test_escapes.rb +8 -6
- data/test/scanner/test_free_space.rb +89 -65
- data/test/scanner/test_groups.rb +27 -32
- data/test/scanner/test_keep.rb +24 -22
- data/test/scanner/test_literals.rb +11 -7
- data/test/scanner/test_meta.rb +11 -7
- data/test/scanner/test_properties.rb +16 -14
- data/test/scanner/test_quantifiers.rb +8 -9
- data/test/scanner/test_refcalls.rb +26 -23
- data/test/scanner/test_scripts.rb +11 -10
- data/test/scanner/test_sets.rb +8 -5
- data/test/scanner/test_types.rb +17 -15
- data/test/scanner/test_unicode_blocks.rb +11 -10
- data/test/syntax/ruby/test_1.8.rb +4 -8
- data/test/syntax/ruby/test_1.9.1.rb +1 -7
- data/test/syntax/ruby/test_1.9.3.rb +3 -7
- data/test/syntax/ruby/test_2.0.0.rb +1 -7
- data/test/syntax/ruby/test_2.2.0.rb +1 -7
- data/test/token/test_token.rb +29 -31
- metadata +3 -3
data/test/lexer/test_nesting.rb
CHANGED
@@ -92,15 +92,22 @@ class LexerNesting < Test::Unit::TestCase
|
|
92
92
|
},
|
93
93
|
}
|
94
94
|
|
95
|
-
|
96
|
-
|
97
|
-
define_method "test_lex_nesting_#{count+=1}" do
|
98
|
-
|
95
|
+
tests.each_with_index do |(pattern, checks), count|
|
96
|
+
define_method "test_lex_nesting_#{count}" do
|
99
97
|
tokens = RL.lex(pattern, 'ruby/1.9')
|
100
|
-
checks.each do |offset, token|
|
101
|
-
assert_equal( token, tokens[offset].to_a )
|
102
|
-
end
|
103
98
|
|
99
|
+
checks.each do |offset, (type, token, text, ts, te, level, set_level, conditional_level)|
|
100
|
+
struct = tokens.at(offset)
|
101
|
+
|
102
|
+
assert_equal type, struct.type
|
103
|
+
assert_equal token, struct.token
|
104
|
+
assert_equal text, struct.text
|
105
|
+
assert_equal ts, struct.ts
|
106
|
+
assert_equal te, struct.te
|
107
|
+
assert_equal level, struct.level
|
108
|
+
assert_equal set_level, struct.set_level
|
109
|
+
assert_equal conditional_level, struct.conditional_level
|
110
|
+
end
|
104
111
|
end
|
105
112
|
end
|
106
113
|
|
data/test/lexer/test_refcalls.rb
CHANGED
@@ -31,12 +31,19 @@ class LexerRefCalls < Test::Unit::TestCase
|
|
31
31
|
"(abc)\\k'1-0'" => [3, :backref, :number_nest_ref, "\\k'1-0'", 5, 12, 0, 0, 0],
|
32
32
|
}
|
33
33
|
|
34
|
-
|
35
|
-
|
36
|
-
define_method "test_lexer_#{test[1]}_#{test[2]}_#{count+=1}" do
|
37
|
-
|
34
|
+
tests.each_with_index do |(pattern, (index, type, token, text, ts, te, level, set_level, conditional_level)), count|
|
35
|
+
define_method "test_lexer_#{type}_#{token}_#{count}" do
|
38
36
|
tokens = RL.lex(pattern, 'ruby/1.9')
|
39
|
-
|
37
|
+
struct = tokens.at(index)
|
38
|
+
|
39
|
+
assert_equal type, struct.type
|
40
|
+
assert_equal token, struct.token
|
41
|
+
assert_equal text, struct.text
|
42
|
+
assert_equal ts, struct.ts
|
43
|
+
assert_equal te, struct.te
|
44
|
+
assert_equal level, struct.level
|
45
|
+
assert_equal set_level, struct.set_level
|
46
|
+
assert_equal conditional_level, struct.conditional_level
|
40
47
|
end
|
41
48
|
end
|
42
49
|
|
data/test/parser/test_all.rb
CHANGED
@@ -16,36 +16,38 @@ end
|
|
16
16
|
class TestParser < Test::Unit::TestCase
|
17
17
|
|
18
18
|
def test_parse_returns_a_root_expression
|
19
|
-
assert_instance_of
|
19
|
+
assert_instance_of Regexp::Expression::Root, RP.parse('abc')
|
20
20
|
end
|
21
21
|
|
22
22
|
|
23
23
|
def test_parse_root_contains_expressions
|
24
24
|
root = RP.parse(/^a.c+[^one]{2,3}\b\d\\\C-C$/)
|
25
25
|
|
26
|
-
|
27
|
-
exp.kind_of?(Regexp::Expression::Base)
|
28
|
-
|
26
|
+
all_base = root.expressions.all? do |exp|
|
27
|
+
exp.kind_of?(Regexp::Expression::Base)
|
28
|
+
end
|
29
|
+
|
30
|
+
assert all_base, "Not all nodes are instances of Regexp::Expression"
|
29
31
|
end
|
30
32
|
|
31
33
|
|
32
34
|
def test_parse_node_types
|
33
35
|
root = RP.parse('^(one){2,3}([^d\]efm-qz\,\-]*)(ghi)+$')
|
34
36
|
|
35
|
-
assert
|
36
|
-
"Not a literal node, but should be"
|
37
|
+
assert root.expressions[1].expressions[0].is_a?(Literal),
|
38
|
+
"Not a literal node, but should be"
|
37
39
|
|
38
|
-
assert
|
40
|
+
assert root.expressions[1].quantified?, "Not quanfified, but should be"
|
39
41
|
|
40
|
-
assert
|
41
|
-
"Not a caracter set, but it should be"
|
42
|
+
assert root.expressions[2].expressions[0].is_a?(CharacterSet),
|
43
|
+
"Not a caracter set, but it should be"
|
42
44
|
|
43
|
-
assert_equal
|
45
|
+
assert_equal false, root.expressions[2].quantified?
|
44
46
|
|
45
|
-
assert
|
46
|
-
"Not a group, but should be"
|
47
|
+
assert root.expressions[3].is_a?(Group::Capture),
|
48
|
+
"Not a group, but should be"
|
47
49
|
|
48
|
-
assert_equal
|
50
|
+
assert_equal true, root.expressions[3].quantified?
|
49
51
|
end
|
50
52
|
|
51
53
|
def test_parse_no_quantifier_target_raises_error
|
@@ -8,43 +8,43 @@ class ParserAlternation < Test::Unit::TestCase
|
|
8
8
|
|
9
9
|
def test_parse_alternation_root
|
10
10
|
e = @root.expressions[0]
|
11
|
-
assert_equal
|
11
|
+
assert_equal true, e.is_a?(Alternation)
|
12
12
|
end
|
13
13
|
|
14
14
|
def test_parse_alternation_alts
|
15
15
|
alts = @root.expressions[0].alternatives
|
16
16
|
|
17
|
-
assert_equal
|
18
|
-
assert_equal
|
17
|
+
assert_equal true, alts[0].is_a?(Alternative)
|
18
|
+
assert_equal true, alts[1].is_a?(Alternative)
|
19
19
|
|
20
|
-
assert_equal
|
21
|
-
assert_equal
|
20
|
+
assert_equal true, alts[0][0].is_a?(Group::Capture)
|
21
|
+
assert_equal true, alts[1][0].is_a?(Group::Capture)
|
22
22
|
|
23
|
-
assert_equal
|
23
|
+
assert_equal 2, alts.length
|
24
24
|
end
|
25
25
|
|
26
26
|
def test_parse_alternation_nested
|
27
27
|
e = @root[0].alternatives[0][0][0]
|
28
28
|
|
29
|
-
assert_equal
|
29
|
+
assert_equal true, e.is_a?(Alternation)
|
30
30
|
end
|
31
31
|
|
32
32
|
def test_parse_alternation_nested_sequence
|
33
33
|
alts = @root.expressions[0][0]
|
34
34
|
nested = alts.expressions[0][0][0]
|
35
35
|
|
36
|
-
assert_equal
|
36
|
+
assert_equal true, nested.is_a?(Alternative)
|
37
37
|
|
38
|
-
assert_equal
|
39
|
-
assert_equal
|
40
|
-
assert_equal
|
38
|
+
assert_equal true, nested.expressions[0].is_a?(Literal)
|
39
|
+
assert_equal true, nested.expressions[1].is_a?(Literal)
|
40
|
+
assert_equal 2, nested.expressions.length
|
41
41
|
end
|
42
42
|
|
43
43
|
def test_parse_alternation_nested_groups
|
44
44
|
root = RP.parse('(i|ey|([ougfd]+)|(ney))')
|
45
45
|
|
46
46
|
alts = root.expressions[0][0].alternatives
|
47
|
-
assert_equal
|
47
|
+
assert_equal 4, alts.length
|
48
48
|
end
|
49
49
|
|
50
50
|
def test_parse_alternation_grouped_alts
|
@@ -52,11 +52,12 @@ class ParserAlternation < Test::Unit::TestCase
|
|
52
52
|
|
53
53
|
alts = root.expressions[1][0].alternatives
|
54
54
|
|
55
|
-
assert_equal
|
56
|
-
|
57
|
-
assert_equal
|
58
|
-
assert_equal
|
59
|
-
assert_equal
|
55
|
+
assert_equal 4, alts.length
|
56
|
+
|
57
|
+
assert_equal true, alts[0].is_a?(Alternative)
|
58
|
+
assert_equal true, alts[1].is_a?(Alternative)
|
59
|
+
assert_equal true, alts[2].is_a?(Alternative)
|
60
|
+
assert_equal true, alts[3].is_a?(Alternative)
|
60
61
|
end
|
61
62
|
|
62
63
|
def test_parse_alternation_nested_grouped_alts
|
@@ -64,15 +65,17 @@ class ParserAlternation < Test::Unit::TestCase
|
|
64
65
|
|
65
66
|
alts = root.expressions[1][0].alternatives
|
66
67
|
|
67
|
-
assert_equal
|
68
|
-
|
69
|
-
assert_equal
|
68
|
+
assert_equal 2, alts.length
|
69
|
+
|
70
|
+
assert_equal true, alts[0].is_a?(Alternative)
|
71
|
+
assert_equal true, alts[1].is_a?(Alternative)
|
70
72
|
|
71
73
|
subalts = root.expressions[1][0][0][0][0].alternatives
|
72
74
|
|
73
|
-
assert_equal
|
74
|
-
|
75
|
-
assert_equal
|
75
|
+
assert_equal 2, alts.length
|
76
|
+
|
77
|
+
assert_equal true, subalts[0].is_a?(Alternative)
|
78
|
+
assert_equal true, subalts[1].is_a?(Alternative)
|
76
79
|
end
|
77
80
|
|
78
81
|
def test_parse_alternation_continues_after_nesting
|
@@ -80,10 +83,10 @@ class ParserAlternation < Test::Unit::TestCase
|
|
80
83
|
|
81
84
|
seq = root.expressions[0][1].expressions
|
82
85
|
|
83
|
-
assert_equal
|
86
|
+
assert_equal 2, seq.length
|
84
87
|
|
85
|
-
assert_equal
|
86
|
-
assert_equal
|
88
|
+
assert_equal true, seq[0].is_a?(Group::Capture)
|
89
|
+
assert_equal true, seq[1].is_a?(Literal)
|
87
90
|
end
|
88
91
|
|
89
92
|
end
|
data/test/parser/test_anchors.rb
CHANGED
@@ -18,17 +18,16 @@ class TestParserAnchors < Test::Unit::TestCase
|
|
18
18
|
"\\\\Aa" => [0, :escape, :backslash, EscapeSequence::Literal],
|
19
19
|
}
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
define_method "test_parse_anchor_#{test[2]}_#{count+=1}" do
|
21
|
+
tests.each_with_index do |(pattern, (index, type, token, klass)), count|
|
22
|
+
define_method "test_parse_anchor_#{token}_#{count}" do
|
24
23
|
root = RP.parse(pattern, 'ruby/1.9')
|
25
|
-
exp = root.expressions
|
24
|
+
exp = root.expressions.at(index)
|
26
25
|
|
27
|
-
assert
|
28
|
-
"Expected #{
|
26
|
+
assert exp.is_a?(klass),
|
27
|
+
"Expected #{klass}, but got #{exp.class.name}"
|
29
28
|
|
30
|
-
assert_equal
|
31
|
-
assert_equal
|
29
|
+
assert_equal type, exp.type
|
30
|
+
assert_equal token, exp.token
|
32
31
|
end
|
33
32
|
end
|
34
33
|
|
@@ -8,12 +8,12 @@ class TestParserConditionals < Test::Unit::TestCase
|
|
8
8
|
root = RP.parse(regexp, 'ruby/2.0')
|
9
9
|
exp = root.expressions[1]
|
10
10
|
|
11
|
-
assert
|
12
|
-
"Expected Condition, but got #{exp.class.name}"
|
11
|
+
assert exp.is_a?(Conditional::Expression),
|
12
|
+
"Expected Condition, but got #{exp.class.name}"
|
13
13
|
|
14
|
-
assert_equal
|
15
|
-
assert_equal
|
16
|
-
assert_equal
|
14
|
+
assert_equal exp.type, :conditional
|
15
|
+
assert_equal exp.token, :open
|
16
|
+
assert_equal exp.text, '(?'
|
17
17
|
end
|
18
18
|
|
19
19
|
|
@@ -23,12 +23,12 @@ class TestParserConditionals < Test::Unit::TestCase
|
|
23
23
|
root = RP.parse(regexp, 'ruby/2.0')
|
24
24
|
exp = root[1].condition
|
25
25
|
|
26
|
-
assert
|
27
|
-
"Expected Condition, but got #{exp.class.name}"
|
26
|
+
assert exp.is_a?(Conditional::Condition),
|
27
|
+
"Expected Condition, but got #{exp.class.name}"
|
28
28
|
|
29
|
-
assert_equal
|
30
|
-
assert_equal
|
31
|
-
assert_equal
|
29
|
+
assert_equal exp.type, :conditional
|
30
|
+
assert_equal exp.token, :condition
|
31
|
+
assert_equal exp.text, '(<A>)'
|
32
32
|
end
|
33
33
|
|
34
34
|
|
@@ -37,35 +37,37 @@ class TestParserConditionals < Test::Unit::TestCase
|
|
37
37
|
|
38
38
|
root = RP.parse(regexp, 'ruby/2.0')
|
39
39
|
|
40
|
-
assert_equal
|
40
|
+
assert_equal regexp.source, root.to_s
|
41
41
|
|
42
42
|
group = root.first
|
43
|
-
assert_equal
|
43
|
+
assert_equal Group::Capture, group.class
|
44
44
|
|
45
45
|
alt = group.first
|
46
|
-
assert_equal
|
47
|
-
assert_equal
|
46
|
+
assert_equal Alternation, alt.class
|
47
|
+
assert_equal 3, alt.length
|
48
48
|
|
49
|
-
|
50
|
-
exp.first.is_a?(Group::Capture)
|
51
|
-
|
49
|
+
all_captures = alt.all? do |exp|
|
50
|
+
exp.first.is_a?(Group::Capture)
|
51
|
+
end
|
52
|
+
|
53
|
+
assert_equal true, all_captures
|
52
54
|
|
53
55
|
subgroup = alt[2].first
|
54
56
|
conditional = subgroup.first
|
55
57
|
|
56
|
-
assert_equal
|
57
|
-
assert_equal
|
58
|
+
assert_equal Conditional::Expression, conditional.class
|
59
|
+
assert_equal 3, conditional.length
|
58
60
|
|
59
|
-
assert_equal
|
60
|
-
assert_equal
|
61
|
+
assert_equal Conditional::Condition, conditional[0].class
|
62
|
+
assert_equal '(2)', conditional[0].text
|
61
63
|
|
62
64
|
condition = conditional.condition
|
63
|
-
assert_equal
|
64
|
-
assert_equal
|
65
|
+
assert_equal Conditional::Condition, condition.class
|
66
|
+
assert_equal '(2)', condition.text
|
65
67
|
|
66
68
|
branches = conditional.branches
|
67
|
-
assert_equal
|
68
|
-
assert_equal
|
69
|
+
assert_equal 2, branches.length
|
70
|
+
assert_equal Array, branches.class
|
69
71
|
end
|
70
72
|
|
71
73
|
def test_parse_conditional_nested
|
@@ -73,7 +75,7 @@ class TestParserConditionals < Test::Unit::TestCase
|
|
73
75
|
|
74
76
|
root = RP.parse(regexp, 'ruby/2.0')
|
75
77
|
|
76
|
-
assert_equal
|
78
|
+
assert_equal regexp.source, root.to_s
|
77
79
|
|
78
80
|
{ 1 => [2, root[1]],
|
79
81
|
2 => [2, root[1][1][0]],
|
@@ -83,9 +85,9 @@ class TestParserConditionals < Test::Unit::TestCase
|
|
83
85
|
}.each do |index, test|
|
84
86
|
branch_count, exp = test
|
85
87
|
|
86
|
-
assert_equal
|
87
|
-
assert_equal
|
88
|
-
assert_equal
|
88
|
+
assert_equal Conditional::Expression, exp.class
|
89
|
+
assert_equal "(#{index})", exp.condition.text
|
90
|
+
assert_equal branch_count, exp.branches.length
|
89
91
|
end
|
90
92
|
end
|
91
93
|
|
@@ -95,9 +97,9 @@ class TestParserConditionals < Test::Unit::TestCase
|
|
95
97
|
|
96
98
|
root = RP.parse(regexp, 'ruby/2.0')
|
97
99
|
|
98
|
-
assert_equal
|
100
|
+
assert_equal regexp.source, root.to_s
|
99
101
|
|
100
|
-
assert_equal
|
102
|
+
assert_equal Alternation, root.first.class
|
101
103
|
|
102
104
|
[ [3, 'b|c|d', root[0][0][1][1][0][0]],
|
103
105
|
[3, 'e|f|g', root[0][0][1][2][0][0]],
|
@@ -106,9 +108,9 @@ class TestParserConditionals < Test::Unit::TestCase
|
|
106
108
|
].each do |test|
|
107
109
|
alt_count, alt_text, exp = test
|
108
110
|
|
109
|
-
assert_equal
|
110
|
-
assert_equal
|
111
|
-
assert_equal
|
111
|
+
assert_equal Alternation, exp.class
|
112
|
+
assert_equal alt_text, exp.to_s
|
113
|
+
assert_equal alt_count, exp.alternatives.length
|
112
114
|
end
|
113
115
|
end
|
114
116
|
|
@@ -119,20 +121,20 @@ class TestParserConditionals < Test::Unit::TestCase
|
|
119
121
|
root = RP.parse(regexp, 'ruby/2.0')
|
120
122
|
branches = root[1].branches
|
121
123
|
|
122
|
-
assert_equal
|
124
|
+
assert_equal 2, branches.length
|
123
125
|
|
124
126
|
seq_1, seq_2 = branches
|
125
127
|
|
126
128
|
[seq_1, seq_2].each do |seq|
|
127
|
-
assert
|
128
|
-
"Expected Condition, but got #{seq.class.name}"
|
129
|
+
assert seq.is_a?( Sequence ),
|
130
|
+
"Expected Condition, but got #{seq.class.name}"
|
129
131
|
|
130
|
-
assert_equal
|
131
|
-
assert_equal
|
132
|
+
assert_equal :expression, seq.type
|
133
|
+
assert_equal :sequence, seq.token
|
132
134
|
end
|
133
135
|
|
134
|
-
assert_equal
|
135
|
-
assert_equal
|
136
|
+
assert_equal 'T', seq_1.to_s
|
137
|
+
assert_equal '', seq_2.to_s
|
136
138
|
end
|
137
139
|
|
138
140
|
|
data/test/parser/test_escapes.rb
CHANGED
@@ -28,48 +28,50 @@ class TestParserEscapes < Test::Unit::TestCase
|
|
28
28
|
|
29
29
|
# unicode escapes
|
30
30
|
/a\u{9879}/ => [1, :escape, :codepoint_list, EscapeSequence::Literal],
|
31
|
+
|
32
|
+
# hex escapes
|
33
|
+
/a\xFF/n => [1, :escape, :hex, EscapeSequence::Literal],
|
31
34
|
}
|
32
35
|
|
33
|
-
|
34
|
-
|
35
|
-
define_method "test_parse_escape_#{test[2]}_#{count+=1}" do
|
36
|
+
tests.each_with_index do |(pattern, (index, type, token, klass)), count|
|
37
|
+
define_method "test_parse_escape_#{token}_#{count+=1}" do
|
36
38
|
root = RP.parse(pattern, 'ruby/1.9')
|
37
|
-
exp = root.expressions
|
39
|
+
exp = root.expressions.at(index)
|
38
40
|
|
39
|
-
assert
|
40
|
-
"Expected #{
|
41
|
+
assert exp.is_a?(klass),
|
42
|
+
"Expected #{klass}, but got #{exp.class.name}"
|
41
43
|
|
42
|
-
assert_equal
|
43
|
-
assert_equal
|
44
|
+
assert_equal type, exp.type
|
45
|
+
assert_equal token, exp.token
|
44
46
|
end
|
45
47
|
end
|
46
48
|
|
47
49
|
def test_parse_escape_control_sequence_lower
|
48
50
|
root = RP.parse(/a\\\c2b/)
|
49
51
|
|
50
|
-
assert_equal
|
51
|
-
assert_equal
|
52
|
+
assert_equal EscapeSequence::Control, root[2].class
|
53
|
+
assert_equal '\\c2', root[2].text
|
52
54
|
end
|
53
55
|
|
54
56
|
def test_parse_escape_control_sequence_upper
|
55
57
|
root = RP.parse(/\d\\\C-C\w/)
|
56
58
|
|
57
|
-
assert_equal
|
58
|
-
assert_equal
|
59
|
+
assert_equal EscapeSequence::Control, root[2].class
|
60
|
+
assert_equal '\\C-C', root[2].text
|
59
61
|
end
|
60
62
|
|
61
63
|
def test_parse_escape_meta_sequence
|
62
64
|
root = RP.parse(/\Z\\\M-Z/n)
|
63
65
|
|
64
|
-
assert_equal
|
65
|
-
assert_equal
|
66
|
+
assert_equal EscapeSequence::Meta, root[2].class
|
67
|
+
assert_equal '\\M-Z', root[2].text
|
66
68
|
end
|
67
69
|
|
68
70
|
def test_parse_escape_meta_control_sequence
|
69
71
|
root = RP.parse(/\A\\\M-\C-X/n)
|
70
72
|
|
71
|
-
assert_equal
|
72
|
-
assert_equal
|
73
|
+
assert_equal EscapeSequence::MetaControl, root[2].class
|
74
|
+
assert_equal '\\M-\\C-X', root[2].text
|
73
75
|
end
|
74
76
|
|
75
77
|
end
|