sass 3.2.0.alpha.54 → 3.2.0.alpha.55
Sign up to get free protection for your applications and to get access to all the features.
- data/REVISION +1 -1
- data/VERSION +1 -1
- data/test/sass/util/multibyte_string_scanner_test.rb +141 -139
- metadata +7 -7
data/REVISION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
08c1d5258cbb8128cead8f24418ab288a544272d
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.2.0.alpha.
|
1
|
+
3.2.0.alpha.55
|
@@ -2,144 +2,146 @@
|
|
2
2
|
# -*- coding: utf-8 -*-
|
3
3
|
require File.dirname(__FILE__) + '/../../test_helper'
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
5
|
+
unless Sass::Util.ruby1_8?
|
6
|
+
class MultibyteStringScannerTest < Test::Unit::TestCase
|
7
|
+
def setup
|
8
|
+
@scanner = Sass::Util::MultibyteStringScanner.new("cölorfül")
|
9
|
+
end
|
10
|
+
|
11
|
+
def test_initial
|
12
|
+
assert_scanner_state 0, 0, nil, nil
|
13
|
+
end
|
14
|
+
|
15
|
+
def test_check
|
16
|
+
assert_equal 'cö', @scanner.check(/../)
|
17
|
+
assert_scanner_state 0, 0, 2, 3
|
18
|
+
assert_equal 0, @scanner.pos
|
19
|
+
assert_equal 0, @scanner.pos
|
20
|
+
assert_equal 2, @scanner.matched_size
|
21
|
+
assert_equal 3, @scanner.byte_matched_size
|
22
|
+
end
|
23
|
+
|
24
|
+
def test_check_until
|
25
|
+
assert_equal 'cölorfü', @scanner.check_until(/f./)
|
26
|
+
assert_scanner_state 0, 0, 2, 3
|
27
|
+
end
|
28
|
+
|
29
|
+
def test_getch
|
30
|
+
assert_equal 'c', @scanner.getch
|
31
|
+
assert_equal 'ö', @scanner.getch
|
32
|
+
assert_scanner_state 2, 3, 1, 2
|
33
|
+
end
|
34
|
+
|
35
|
+
def test_match?
|
36
|
+
assert_equal 2, @scanner.match?(/../)
|
37
|
+
assert_scanner_state 0, 0, 2, 3
|
38
|
+
end
|
39
|
+
|
40
|
+
def test_peek
|
41
|
+
assert_equal 'cö', @scanner.peek(2)
|
42
|
+
assert_scanner_state 0, 0, nil, nil
|
43
|
+
end
|
44
|
+
|
45
|
+
def test_rest_size
|
46
|
+
assert_equal 'cö', @scanner.scan(/../)
|
47
|
+
assert_equal 6, @scanner.rest_size
|
48
|
+
end
|
49
|
+
|
50
|
+
def test_scan
|
51
|
+
assert_equal 'cö', @scanner.scan(/../)
|
52
|
+
assert_scanner_state 2, 3, 2, 3
|
53
|
+
end
|
54
|
+
|
55
|
+
def test_scan_until
|
56
|
+
assert_equal 'cölorfü', @scanner.scan_until(/f./)
|
57
|
+
assert_scanner_state 7, 9, 2, 3
|
58
|
+
end
|
59
|
+
|
60
|
+
def test_skip
|
61
|
+
assert_equal 2, @scanner.skip(/../)
|
62
|
+
assert_scanner_state 2, 3, 2, 3
|
63
|
+
end
|
64
|
+
|
65
|
+
def test_skip_until
|
66
|
+
assert_equal 7, @scanner.skip_until(/f./)
|
67
|
+
assert_scanner_state 7, 9, 2, 3
|
68
|
+
end
|
69
|
+
|
70
|
+
def test_set_pos
|
71
|
+
@scanner.pos = 7
|
72
|
+
assert_scanner_state 7, 9, nil, nil
|
73
|
+
@scanner.pos = 6
|
74
|
+
assert_scanner_state 6, 7, nil, nil
|
75
|
+
@scanner.pos = 1
|
76
|
+
assert_scanner_state 1, 1, nil, nil
|
77
|
+
end
|
78
|
+
|
79
|
+
def test_reset
|
80
|
+
@scanner.scan(/../)
|
81
|
+
@scanner.reset
|
82
|
+
assert_scanner_state 0, 0, nil, nil
|
83
|
+
end
|
84
|
+
|
85
|
+
def test_scan_full
|
86
|
+
assert_equal 'cö', @scanner.scan_full(/../, true, true)
|
87
|
+
assert_scanner_state 2, 3, 2, 3
|
88
|
+
|
89
|
+
@scanner.reset
|
90
|
+
assert_equal 'cö', @scanner.scan_full(/../, false, true)
|
91
|
+
assert_scanner_state 0, 0, 2, 3
|
92
|
+
|
93
|
+
@scanner.reset
|
94
|
+
assert_nil @scanner.scan_full(/../, true, false)
|
95
|
+
assert_scanner_state 2, 3, 2, 3
|
96
|
+
|
97
|
+
@scanner.reset
|
98
|
+
assert_nil @scanner.scan_full(/../, false, false)
|
99
|
+
assert_scanner_state 0, 0, 2, 3
|
100
|
+
end
|
101
|
+
|
102
|
+
def test_search_full
|
103
|
+
assert_equal 'cölorfü', @scanner.search_full(/f./, true, true)
|
104
|
+
assert_scanner_state 7, 9, 2, 3
|
105
|
+
|
106
|
+
@scanner.reset
|
107
|
+
assert_equal 'cölorfü', @scanner.search_full(/f./, false, true)
|
108
|
+
assert_scanner_state 0, 0, 2, 3
|
109
|
+
|
110
|
+
@scanner.reset
|
111
|
+
assert_nil @scanner.search_full(/f./, true, false)
|
112
|
+
assert_scanner_state 7, 9, 2, 3
|
113
|
+
|
114
|
+
@scanner.reset
|
115
|
+
assert_nil @scanner.search_full(/f./, false, false)
|
116
|
+
assert_scanner_state 0, 0, 2, 3
|
117
|
+
end
|
118
|
+
|
119
|
+
def test_set_string
|
120
|
+
@scanner.scan(/../)
|
121
|
+
@scanner.string = 'föóbâr'
|
122
|
+
assert_scanner_state 0, 0, nil, nil
|
123
|
+
end
|
124
|
+
|
125
|
+
def test_terminate
|
126
|
+
@scanner.scan(/../)
|
127
|
+
@scanner.terminate
|
128
|
+
assert_scanner_state 8, 10, nil, nil
|
129
|
+
end
|
130
|
+
|
131
|
+
def test_unscan
|
132
|
+
@scanner.scan(/../)
|
133
|
+
@scanner.scan_until(/f./)
|
134
|
+
@scanner.unscan
|
135
|
+
assert_scanner_state 2, 3, nil, nil
|
136
|
+
end
|
137
|
+
|
138
|
+
private
|
139
|
+
|
140
|
+
def assert_scanner_state(pos, byte_pos, matched_size, byte_matched_size)
|
141
|
+
assert_equal pos, @scanner.pos, 'pos'
|
142
|
+
assert_equal byte_pos, @scanner.byte_pos, 'byte_pos'
|
143
|
+
assert_equal matched_size, @scanner.matched_size, 'matched_size'
|
144
|
+
assert_equal byte_matched_size, @scanner.byte_matched_size, 'byte_matched_size'
|
145
|
+
end
|
144
146
|
end
|
145
147
|
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 592302963
|
5
5
|
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 3
|
8
8
|
- 2
|
9
9
|
- 0
|
10
10
|
- alpha
|
11
|
-
-
|
12
|
-
version: 3.2.0.alpha.
|
11
|
+
- 55
|
12
|
+
version: 3.2.0.alpha.55
|
13
13
|
platform: ruby
|
14
14
|
authors:
|
15
15
|
- Nathan Weizenbaum
|
@@ -150,7 +150,6 @@ files:
|
|
150
150
|
- lib/sass/tree/root_node.rb
|
151
151
|
- lib/sass/tree/rule_node.rb
|
152
152
|
- lib/sass/tree/content_node.rb
|
153
|
-
- lib/sass/tree/trace_node.rb
|
154
153
|
- lib/sass/tree/variable_node.rb
|
155
154
|
- lib/sass/tree/visitors/base.rb
|
156
155
|
- lib/sass/tree/visitors/check_nesting.rb
|
@@ -162,9 +161,10 @@ files:
|
|
162
161
|
- lib/sass/tree/visitors/to_css.rb
|
163
162
|
- lib/sass/tree/warn_node.rb
|
164
163
|
- lib/sass/tree/while_node.rb
|
164
|
+
- lib/sass/tree/trace_node.rb
|
165
165
|
- lib/sass/util.rb
|
166
|
-
- lib/sass/util/subset_map.rb
|
167
166
|
- lib/sass/util/multibyte_string_scanner.rb
|
167
|
+
- lib/sass/util/subset_map.rb
|
168
168
|
- lib/sass/version.rb
|
169
169
|
- vendor/fssm/Gemfile
|
170
170
|
- vendor/fssm/LICENSE
|
@@ -306,8 +306,8 @@ files:
|
|
306
306
|
- test/sass/templates/warn.sass
|
307
307
|
- test/sass/templates/warn_imported.sass
|
308
308
|
- test/sass/test_helper.rb
|
309
|
-
- test/sass/util/subset_map_test.rb
|
310
309
|
- test/sass/util/multibyte_string_scanner_test.rb
|
310
|
+
- test/sass/util/subset_map_test.rb
|
311
311
|
- test/sass/util_test.rb
|
312
312
|
- test/test_helper.rb
|
313
313
|
- extra/update_watch.rb
|
@@ -375,6 +375,6 @@ test_files:
|
|
375
375
|
- test/sass/scss/css_test.rb
|
376
376
|
- test/sass/scss/rx_test.rb
|
377
377
|
- test/sass/scss/scss_test.rb
|
378
|
-
- test/sass/util/subset_map_test.rb
|
379
378
|
- test/sass/util/multibyte_string_scanner_test.rb
|
379
|
+
- test/sass/util/subset_map_test.rb
|
380
380
|
- test/sass/util_test.rb
|