regexp_parser 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,29 +0,0 @@
1
- require File.expand_path("../../helpers", __FILE__)
2
-
3
- class ScannerQuoting < Test::Unit::TestCase
4
-
5
- tests = {
6
- /\Qquoted\Ea/ => [0, :quoted, :literal, '\Qquoted\E', 0, 10],
7
- /\Qquoted\Eb/ => [1, :literal, :literal, 'b', 10, 11],
8
- /a\Qquoted\Eb\Qquoted\Ec/ => [3, :quoted, :literal, '\Qquoted\E', 12, 22],
9
- /a\Qqu\o\t\ed\Eb/ => [1, :quoted, :literal, '\Qqu\o\t\ed\E', 1, 14],
10
- }
11
-
12
- count = 0
13
- tests.each do |pattern, test|
14
- define_method "test_scan_#{test[1]}_#{test[2]}_#{count+=1}" do
15
-
16
- tokens = RS.scan(pattern)
17
- token = tokens[test[0]]
18
- assert_equal( test[1,5], token )
19
-
20
- end
21
- end
22
-
23
- #def test_scanner_quote
24
- # tokens = RS.scan('a\QX\Eb\QX\Ec')
25
- # puts tokens.inspect
26
- # #assert_equal( tokens[0] )
27
- #end
28
-
29
- end