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 CHANGED
@@ -1 +1 @@
1
- 594a6d23b2e7b60d1b522c1c2575c9db8681e9f7
1
+ 08c1d5258cbb8128cead8f24418ab288a544272d
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.2.0.alpha.54
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
- class MultibyteStringScannerTest < Test::Unit::TestCase
6
- def setup
7
- @scanner = Sass::Util::MultibyteStringScanner.new("cölorfül")
8
- end
9
-
10
- def test_initial
11
- assert_scanner_state 0, 0, nil, nil
12
- end
13
-
14
- def test_check
15
- assert_equal 'cö', @scanner.check(/../)
16
- assert_scanner_state 0, 0, 2, 3
17
- assert_equal 0, @scanner.pos
18
- assert_equal 0, @scanner.pos
19
- assert_equal 2, @scanner.matched_size
20
- assert_equal 3, @scanner.byte_matched_size
21
- end
22
-
23
- def test_check_until
24
- assert_equal 'cölorfü', @scanner.check_until(/f./)
25
- assert_scanner_state 0, 0, 2, 3
26
- end
27
-
28
- def test_getch
29
- assert_equal 'c', @scanner.getch
30
- assert_equal 'ö', @scanner.getch
31
- assert_scanner_state 2, 3, 1, 2
32
- end
33
-
34
- def test_match?
35
- assert_equal 2, @scanner.match?(/../)
36
- assert_scanner_state 0, 0, 2, 3
37
- end
38
-
39
- def test_peek
40
- assert_equal 'cö', @scanner.peek(2)
41
- assert_scanner_state 0, 0, nil, nil
42
- end
43
-
44
- def test_rest_size
45
- assert_equal 'cö', @scanner.scan(/../)
46
- assert_equal 6, @scanner.rest_size
47
- end
48
-
49
- def test_scan
50
- assert_equal 'cö', @scanner.scan(/../)
51
- assert_scanner_state 2, 3, 2, 3
52
- end
53
-
54
- def test_scan_until
55
- assert_equal 'cölorfü', @scanner.scan_until(/f./)
56
- assert_scanner_state 7, 9, 2, 3
57
- end
58
-
59
- def test_skip
60
- assert_equal 2, @scanner.skip(/../)
61
- assert_scanner_state 2, 3, 2, 3
62
- end
63
-
64
- def test_skip_until
65
- assert_equal 7, @scanner.skip_until(/f./)
66
- assert_scanner_state 7, 9, 2, 3
67
- end
68
-
69
- def test_set_pos
70
- @scanner.pos = 7
71
- assert_scanner_state 7, 9, nil, nil
72
- @scanner.pos = 6
73
- assert_scanner_state 6, 7, nil, nil
74
- @scanner.pos = 1
75
- assert_scanner_state 1, 1, nil, nil
76
- end
77
-
78
- def test_reset
79
- @scanner.scan(/../)
80
- @scanner.reset
81
- assert_scanner_state 0, 0, nil, nil
82
- end
83
-
84
- def test_scan_full
85
- assert_equal 'cö', @scanner.scan_full(/../, true, true)
86
- assert_scanner_state 2, 3, 2, 3
87
-
88
- @scanner.reset
89
- assert_equal 'cö', @scanner.scan_full(/../, false, true)
90
- assert_scanner_state 0, 0, 2, 3
91
-
92
- @scanner.reset
93
- assert_nil @scanner.scan_full(/../, true, false)
94
- assert_scanner_state 2, 3, 2, 3
95
-
96
- @scanner.reset
97
- assert_nil @scanner.scan_full(/../, false, false)
98
- assert_scanner_state 0, 0, 2, 3
99
- end
100
-
101
- def test_search_full
102
- assert_equal 'cölorfü', @scanner.search_full(/f./, true, true)
103
- assert_scanner_state 7, 9, 2, 3
104
-
105
- @scanner.reset
106
- assert_equal 'cölorfü', @scanner.search_full(/f./, false, true)
107
- assert_scanner_state 0, 0, 2, 3
108
-
109
- @scanner.reset
110
- assert_nil @scanner.search_full(/f./, true, false)
111
- assert_scanner_state 7, 9, 2, 3
112
-
113
- @scanner.reset
114
- assert_nil @scanner.search_full(/f./, false, false)
115
- assert_scanner_state 0, 0, 2, 3
116
- end
117
-
118
- def test_set_string
119
- @scanner.scan(/../)
120
- @scanner.string = 'föóbâr'
121
- assert_scanner_state 0, 0, nil, nil
122
- end
123
-
124
- def test_terminate
125
- @scanner.scan(/../)
126
- @scanner.terminate
127
- assert_scanner_state 8, 10, nil, nil
128
- end
129
-
130
- def test_unscan
131
- @scanner.scan(/../)
132
- @scanner.scan_until(/f./)
133
- @scanner.unscan
134
- assert_scanner_state 2, 3, nil, nil
135
- end
136
-
137
- private
138
-
139
- def assert_scanner_state(pos, byte_pos, matched_size, byte_matched_size)
140
- assert_equal pos, @scanner.pos, 'pos'
141
- assert_equal byte_pos, @scanner.byte_pos, 'byte_pos'
142
- assert_equal matched_size, @scanner.matched_size, 'matched_size'
143
- assert_equal byte_matched_size, @scanner.byte_matched_size, 'byte_matched_size'
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: 592302961
4
+ hash: 592302963
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 3
8
8
  - 2
9
9
  - 0
10
10
  - alpha
11
- - 54
12
- version: 3.2.0.alpha.54
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