sass 3.4.25 → 3.5.0.pre.rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -1
  3. data/README.md +1 -1
  4. data/Rakefile +13 -157
  5. data/VERSION +1 -1
  6. data/VERSION_DATE +1 -1
  7. data/VERSION_NAME +1 -1
  8. data/lib/sass.rb +3 -10
  9. data/lib/sass/cache_stores/filesystem.rb +1 -1
  10. data/lib/sass/css.rb +2 -3
  11. data/lib/sass/engine.rb +46 -32
  12. data/lib/sass/environment.rb +27 -6
  13. data/lib/sass/error.rb +5 -5
  14. data/lib/sass/exec/base.rb +3 -12
  15. data/lib/sass/features.rb +1 -0
  16. data/lib/sass/importers/filesystem.rb +2 -2
  17. data/lib/sass/plugin.rb +1 -1
  18. data/lib/sass/plugin/compiler.rb +21 -51
  19. data/lib/sass/plugin/configuration.rb +1 -1
  20. data/lib/sass/plugin/rack.rb +3 -3
  21. data/lib/sass/plugin/staleness_checker.rb +3 -3
  22. data/lib/sass/railtie.rb +1 -1
  23. data/lib/sass/script.rb +3 -3
  24. data/lib/sass/script/functions.rb +238 -47
  25. data/lib/sass/script/lexer.rb +8 -6
  26. data/lib/sass/script/parser.rb +76 -75
  27. data/lib/sass/script/tree/funcall.rb +35 -30
  28. data/lib/sass/script/tree/list_literal.rb +23 -8
  29. data/lib/sass/script/tree/map_literal.rb +2 -2
  30. data/lib/sass/script/tree/node.rb +2 -10
  31. data/lib/sass/script/tree/operation.rb +16 -50
  32. data/lib/sass/script/value.rb +2 -0
  33. data/lib/sass/script/value/arg_list.rb +1 -1
  34. data/lib/sass/script/value/base.rb +20 -3
  35. data/lib/sass/script/value/callable.rb +25 -0
  36. data/lib/sass/script/value/color.rb +10 -10
  37. data/lib/sass/script/value/function.rb +19 -0
  38. data/lib/sass/script/value/helpers.rb +16 -7
  39. data/lib/sass/script/value/list.rb +33 -12
  40. data/lib/sass/script/value/map.rb +2 -2
  41. data/lib/sass/script/value/number.rb +3 -3
  42. data/lib/sass/script/value/string.rb +12 -5
  43. data/lib/sass/scss/parser.rb +101 -45
  44. data/lib/sass/scss/rx.rb +5 -11
  45. data/lib/sass/scss/static_parser.rb +0 -7
  46. data/lib/sass/selector.rb +4 -0
  47. data/lib/sass/selector/abstract_sequence.rb +5 -5
  48. data/lib/sass/selector/comma_sequence.rb +3 -15
  49. data/lib/sass/selector/pseudo.rb +4 -0
  50. data/lib/sass/selector/sequence.rb +30 -3
  51. data/lib/sass/selector/simple.rb +13 -7
  52. data/lib/sass/selector/simple_sequence.rb +1 -1
  53. data/lib/sass/shared.rb +3 -5
  54. data/lib/sass/source/map.rb +4 -4
  55. data/lib/sass/source/position.rb +4 -4
  56. data/lib/sass/stack.rb +21 -1
  57. data/lib/sass/tree/charset_node.rb +1 -1
  58. data/lib/sass/tree/comment_node.rb +1 -1
  59. data/lib/sass/tree/node.rb +3 -3
  60. data/lib/sass/tree/prop_node.rb +46 -54
  61. data/lib/sass/tree/rule_node.rb +7 -15
  62. data/lib/sass/tree/visitors/check_nesting.rb +1 -1
  63. data/lib/sass/tree/visitors/convert.rb +2 -3
  64. data/lib/sass/tree/visitors/cssize.rb +1 -10
  65. data/lib/sass/tree/visitors/deep_copy.rb +2 -2
  66. data/lib/sass/tree/visitors/perform.rb +23 -12
  67. data/lib/sass/tree/visitors/set_options.rb +1 -1
  68. data/lib/sass/tree/visitors/to_css.rb +46 -12
  69. data/lib/sass/util.rb +16 -321
  70. data/lib/sass/util/multibyte_string_scanner.rb +127 -131
  71. data/lib/sass/util/normalized_map.rb +1 -8
  72. data/lib/sass/version.rb +2 -2
  73. data/test/sass-spec.yml +1 -1
  74. data/test/sass/compiler_test.rb +4 -14
  75. data/test/sass/conversion_test.rb +113 -162
  76. data/test/sass/css2sass_test.rb +17 -19
  77. data/test/sass/css_variable_test.rb +176 -70
  78. data/test/sass/encoding_test.rb +2 -32
  79. data/test/sass/engine_test.rb +114 -65
  80. data/test/sass/extend_test.rb +37 -51
  81. data/test/sass/functions_test.rb +57 -15
  82. data/test/sass/importer_test.rb +2 -2
  83. data/test/sass/more_templates/more1.sass +10 -10
  84. data/test/sass/more_templates/more_import.sass +2 -2
  85. data/test/sass/plugin_test.rb +9 -12
  86. data/test/sass/script_conversion_test.rb +9 -0
  87. data/test/sass/script_test.rb +38 -48
  88. data/test/sass/scss/css_test.rb +5 -19
  89. data/test/sass/scss/scss_test.rb +58 -39
  90. data/test/sass/source_map_test.rb +26 -28
  91. data/test/sass/templates/_partial.sass +1 -1
  92. data/test/sass/templates/basic.sass +10 -10
  93. data/test/sass/templates/bork1.sass +1 -1
  94. data/test/sass/templates/bork5.sass +1 -1
  95. data/test/sass/templates/compact.sass +10 -10
  96. data/test/sass/templates/complex.sass +187 -187
  97. data/test/sass/templates/compressed.sass +10 -10
  98. data/test/sass/templates/expanded.sass +10 -10
  99. data/test/sass/templates/import.sass +2 -2
  100. data/test/sass/templates/importee.sass +3 -3
  101. data/test/sass/templates/mixins.sass +22 -22
  102. data/test/sass/templates/multiline.sass +4 -4
  103. data/test/sass/templates/nested.sass +13 -13
  104. data/test/sass/templates/parent_ref.sass +12 -12
  105. data/test/sass/templates/script.sass +70 -70
  106. data/test/sass/templates/subdir/nested_subdir/_nested_partial.sass +1 -1
  107. data/test/sass/templates/subdir/nested_subdir/nested_subdir.sass +2 -2
  108. data/test/sass/templates/subdir/subdir.sass +3 -3
  109. data/test/sass/templates/units.sass +10 -10
  110. data/test/sass/util/multibyte_string_scanner_test.rb +139 -149
  111. data/test/sass/util_test.rb +0 -36
  112. data/test/test_helper.rb +39 -0
  113. metadata +30 -57
  114. data/extra/sass-spec-ref.sh +0 -32
  115. data/lib/sass/deprecation.rb +0 -55
  116. data/lib/sass/script/css_variable_warning.rb +0 -52
  117. data/lib/sass/util/cross_platform_random.rb +0 -19
  118. data/lib/sass/util/ordered_hash.rb +0 -192
  119. data/test/sass/results/import_charset_1_8.css +0 -5
  120. data/test/sass/templates/import_charset_1_8.sass +0 -6
  121. data/vendor/listen/CHANGELOG.md +0 -1
  122. data/vendor/listen/CONTRIBUTING.md +0 -38
  123. data/vendor/listen/Gemfile +0 -20
  124. data/vendor/listen/Guardfile +0 -8
  125. data/vendor/listen/LICENSE +0 -20
  126. data/vendor/listen/README.md +0 -349
  127. data/vendor/listen/Rakefile +0 -5
  128. data/vendor/listen/Vagrantfile +0 -96
  129. data/vendor/listen/lib/listen.rb +0 -54
  130. data/vendor/listen/lib/listen/adapter.rb +0 -327
  131. data/vendor/listen/lib/listen/adapters/bsd.rb +0 -75
  132. data/vendor/listen/lib/listen/adapters/darwin.rb +0 -48
  133. data/vendor/listen/lib/listen/adapters/linux.rb +0 -81
  134. data/vendor/listen/lib/listen/adapters/polling.rb +0 -58
  135. data/vendor/listen/lib/listen/adapters/windows.rb +0 -91
  136. data/vendor/listen/lib/listen/directory_record.rb +0 -406
  137. data/vendor/listen/lib/listen/listener.rb +0 -323
  138. data/vendor/listen/lib/listen/turnstile.rb +0 -32
  139. data/vendor/listen/lib/listen/version.rb +0 -3
  140. data/vendor/listen/listen.gemspec +0 -28
  141. data/vendor/listen/spec/listen/adapter_spec.rb +0 -149
  142. data/vendor/listen/spec/listen/adapters/bsd_spec.rb +0 -36
  143. data/vendor/listen/spec/listen/adapters/darwin_spec.rb +0 -37
  144. data/vendor/listen/spec/listen/adapters/linux_spec.rb +0 -47
  145. data/vendor/listen/spec/listen/adapters/polling_spec.rb +0 -68
  146. data/vendor/listen/spec/listen/adapters/windows_spec.rb +0 -30
  147. data/vendor/listen/spec/listen/directory_record_spec.rb +0 -1250
  148. data/vendor/listen/spec/listen/listener_spec.rb +0 -258
  149. data/vendor/listen/spec/listen/turnstile_spec.rb +0 -56
  150. data/vendor/listen/spec/listen_spec.rb +0 -67
  151. data/vendor/listen/spec/spec_helper.rb +0 -25
  152. data/vendor/listen/spec/support/adapter_helper.rb +0 -666
  153. data/vendor/listen/spec/support/directory_record_helper.rb +0 -57
  154. data/vendor/listen/spec/support/fixtures_helper.rb +0 -29
  155. data/vendor/listen/spec/support/listeners_helper.rb +0 -179
  156. data/vendor/listen/spec/support/platform_helper.rb +0 -15
@@ -14,7 +14,7 @@ CSS
14
14
  h1
15
15
  color: red
16
16
  SASS
17
- silence_warnings {assert_equal(<<SASS, css2sass(css, :old => true))}
17
+ assert_equal(<<SASS, css2sass(css, :old => true))
18
18
  h1
19
19
  :color red
20
20
  SASS
@@ -498,24 +498,22 @@ CSS
498
498
 
499
499
  # Encodings
500
500
 
501
- unless Sass::Util.ruby1_8?
502
- def test_encoding_error
503
- css2sass("foo\nbar\nb\xFEaz".force_encoding("utf-8"))
504
- assert(false, "Expected exception")
505
- rescue Sass::SyntaxError => e
506
- assert_equal(3, e.sass_line)
507
- assert_equal('Invalid UTF-8 character "\xFE"', e.message)
508
- end
509
-
510
- def test_ascii_incompatible_encoding_error
511
- template = "foo\nbar\nb_z".encode("utf-16le")
512
- template[9] = "\xFE".force_encoding("utf-16le")
513
- css2sass(template)
514
- assert(false, "Expected exception")
515
- rescue Sass::SyntaxError => e
516
- assert_equal(3, e.sass_line)
517
- assert_equal('Invalid UTF-16LE character "\xFE"', e.message)
518
- end
501
+ def test_encoding_error
502
+ css2sass("foo\nbar\nb\xFEaz".force_encoding("utf-8"))
503
+ assert(false, "Expected exception")
504
+ rescue Sass::SyntaxError => e
505
+ assert_equal(3, e.sass_line)
506
+ assert_equal('Invalid UTF-8 character "\xFE"', e.message)
507
+ end
508
+
509
+ def test_ascii_incompatible_encoding_error
510
+ template = "foo\nbar\nb_z".encode("utf-16le")
511
+ template[9] = "\xFE".force_encoding("utf-16le")
512
+ css2sass(template)
513
+ assert(false, "Expected exception")
514
+ rescue Sass::SyntaxError => e
515
+ assert_equal(3, e.sass_line)
516
+ assert_equal('Invalid UTF-16LE character "\xFE"', e.message)
519
517
  end
520
518
 
521
519
  private
@@ -3,103 +3,209 @@
3
3
  require File.dirname(__FILE__) + '/../test_helper'
4
4
  require 'sass/engine'
5
5
 
6
+ # Most CSS variable tests are in sass-spec, but a few relate to formatting or
7
+ # conversion and so belong here.
6
8
  class CssVariableTest < MiniTest::Test
7
- def test_variable_warning_for_operators
8
- resolve_with_variable_warning("1 == 2")
9
- resolve_with_variable_warning("1 != 2")
10
- resolve_with_variable_warning("1 < 2")
11
- resolve_with_variable_warning("1 <= 2")
12
- resolve_with_variable_warning("1 > 2")
13
- resolve_with_variable_warning("1 >= 2")
14
- resolve_with_variable_warning("1 + 1")
15
- resolve_with_variable_warning("1 - 1")
16
- resolve_with_variable_warning("1 * 1")
17
- resolve_with_variable_warning("1 % 1")
9
+ def test_folded_inline_whitespace
10
+ assert_variable_value "foo bar baz", "foo bar baz"
11
+ assert_variable_value "foo bar", "foo \t bar"
18
12
  end
19
13
 
20
- def test_variable_warning_for_variable
21
- render_with_variable_warning(<<SCSS, "$var", 3)
14
+ def test_folded_multiline_whitespace
15
+ # We don't want to reformat newlines in nested and expanded mode, so we just
16
+ # remove trailing whitespace before them.
17
+ assert_equal <<CSS, render(<<SCSS)
22
18
  .foo {
23
- $var: value;
24
- --var: $var;
19
+ --multiline: foo
20
+ bar; }
21
+ CSS
22
+ .foo {
23
+ --multiline: foo\s
24
+ bar;
25
25
  }
26
26
  SCSS
27
- end
28
27
 
29
- def test_variable_warning_for_core_function
30
- resolve_with_variable_warning("alpha(#abc)")
31
- end
28
+ assert_equal <<CSS, render(<<SCSS)
29
+ .foo {
30
+ --multiline: foo
31
+
32
32
 
33
- def test_variable_warning_for_sass_function
34
- render_with_variable_warning(<<SCSS, "my-fn()", 2)
35
- @function my-fn() {@return null}
36
- .foo {--var: my-fn()}
33
+ bar; }
34
+ CSS
35
+ .foo {
36
+ --multiline: foo\s
37
+
38
+
39
+ bar;
40
+ }
37
41
  SCSS
38
- end
39
42
 
40
- def test_variable_warning_for_parens
41
- resolve_with_variable_warning("(foo)", "foo")
42
- resolve_with_variable_warning("(foo,)")
43
- end
43
+ assert_equal <<CSS, render(<<SCSS, style: :expanded)
44
+ .foo {
45
+ --multiline: foo
46
+ bar;
47
+ }
48
+ CSS
49
+ .foo {
50
+ --multiline: foo\s
51
+ bar;
52
+ }
53
+ SCSS
54
+
55
+ assert_equal <<CSS, render(<<SCSS, style: :expanded)
56
+ .foo {
57
+ --multiline: foo
58
+
44
59
 
45
- def test_variable_warning_for_selector
46
- resolve_with_variable_warning("&")
60
+ bar;
61
+ }
62
+ CSS
63
+ .foo {
64
+ --multiline: foo\s
65
+
66
+
67
+ bar;
68
+ }
69
+ SCSS
70
+
71
+ # In compact and compressed mode, we fold all whitespace around newlines
72
+ # together.
73
+ assert_equal <<CSS, render(<<SCSS, style: :compact)
74
+ .foo { --multiline: foo bar; }
75
+ CSS
76
+ .foo {
77
+ --multiline: foo\s
78
+ bar;
79
+ }
80
+ SCSS
81
+
82
+ assert_equal <<CSS, render(<<SCSS, style: :compact)
83
+ .foo { --multiline: foo bar; }
84
+ CSS
85
+ .foo {
86
+ --multiline: foo\s
87
+
88
+
89
+ bar;
90
+ }
91
+ SCSS
92
+
93
+ assert_equal <<CSS, render(<<SCSS, style: :compressed)
94
+ .foo{--multiline: foo bar}
95
+ CSS
96
+ .foo {
97
+ --multiline: foo\s
98
+ bar;
99
+ }
100
+ SCSS
101
+
102
+ assert_equal <<CSS, render(<<SCSS, style: :compressed)
103
+ .foo{--multiline: foo bar}
104
+ CSS
105
+ .foo {
106
+ --multiline: foo\s
107
+
108
+
109
+ bar;
110
+ }
111
+ SCSS
47
112
  end
48
113
 
49
- def test_variable_warning_for_nested_properties
50
- assert_warning(<<WARNING) {render(<<SCSS)}
51
- DEPRECATION WARNING on line 2 of #{filename_for_test :scss}:
52
- Sass 3.6 will change the way CSS variables are parsed. Instead of being parsed as
53
- normal properties, they will not allow any Sass-specific behavior other than \#{}.
54
- WARNING
114
+ # Conversion.
115
+
116
+ def test_static_values_convert
117
+ assert_converts <<SASS, <<SCSS
118
+ .foo
119
+ --bar: baz
120
+ SASS
55
121
  .foo {
56
- --var: {
57
- a: b;
58
- }
122
+ --bar: baz;
123
+ }
124
+ SCSS
125
+
126
+ assert_converts <<SASS, <<SCSS
127
+ .foo
128
+ --bar: [({{([!;])}})]
129
+ SASS
130
+ .foo {
131
+ --bar: [({{([!;])}})];
132
+ }
133
+ SCSS
134
+
135
+ assert_converts <<SASS, <<SCSS
136
+ .foo
137
+ --bar: {a: b; c: d}
138
+ SASS
139
+ .foo {
140
+ --bar: {a: b; c: d};
59
141
  }
60
142
  SCSS
61
143
  end
62
144
 
63
- def test_no_warning
64
- assert_no_variable_warning("foo")
65
- assert_no_variable_warning("true")
66
- assert_no_variable_warning("1, 2")
67
- assert_no_variable_warning("1 2")
68
- assert_no_variable_warning("1 / 2")
69
- assert_no_variable_warning("foo / bar")
70
- assert_no_variable_warning("asdf(foo)")
71
- assert_no_variable_warning("calc(1 + 1)")
72
- assert_no_variable_warning("asdf(foo=2)")
145
+ def test_dynamic_values_convert
146
+ assert_converts <<SASS, <<SCSS
147
+ .foo
148
+ --bar: baz \#{bang} qux
149
+ SASS
150
+ .foo {
151
+ --bar: baz \#{bang} qux;
152
+ }
153
+ SCSS
154
+
155
+ assert_converts <<SASS, <<SCSS
156
+ .foo
157
+ --bar: "baz \#{bang} qux"
158
+ SASS
159
+ .foo {
160
+ --bar: "baz \#{bang} qux";
161
+ }
162
+ SCSS
73
163
  end
74
164
 
75
- def test_no_warning_within_interpolation
76
- assert_no_variable_warning('#{1 + 1}')
77
- assert_no_variable_warning('#{alpha(#abc)}')
165
+ def test_multiline_value_converts
166
+ assert_scss_to_scss <<SCSS
167
+ .foo {
168
+ --bar: {
169
+ a: b;
170
+ c: d;
171
+ };
172
+ }
173
+ SCSS
174
+
175
+ assert_scss_to_sass <<SASS, <<SCSS
176
+ .foo
177
+ --bar: { a: b; c: d; }
178
+ SASS
179
+ .foo {
180
+ --bar: {
181
+ a: b;
182
+ c: d;
183
+ };
184
+ }
185
+ SCSS
78
186
  end
79
187
 
80
188
  private
81
189
 
82
- def assert_no_variable_warning(str)
83
- assert_no_warning {render("a {--var: #{str}}")}
84
- assert_no_warning {render("a\n --var: #{str}", :syntax => :sass)}
85
- end
190
+ def assert_variable_value(expected, source)
191
+ expected = <<CSS
192
+ x {
193
+ --variable: #{expected}; }
194
+ CSS
86
195
 
87
- def resolve_with_variable_warning(str, expression = nil)
88
- render_with_variable_warning("a {--var: #{str}}", expression || str, 1)
89
- render_with_variable_warning(
90
- "a\n --var: #{str}", expression || str, 2, :syntax => :sass)
196
+ assert_equal expected, render_variable(source)
197
+ assert_equal expected, render_variable(source, syntax: :sass)
91
198
  end
92
199
 
93
- def render_with_variable_warning(sass, expression, line, opts = {})
94
- opts[:syntax] ||= :scss
95
- assert_warning(<<WARNING) {render(sass, opts)}
96
- DEPRECATION WARNING on line #{line} of #{filename_for_test(opts[:syntax])}:
97
- Sass 3.6 will change the way CSS variables are parsed. Instead of being parsed as
98
- normal properties, they will not allow any Sass-specific behavior other than \#{}.
99
- For forwards-compatibility, use \#{}:
100
-
101
- --variable: \#{#{expression}};
102
- WARNING
200
+ def render_variable(source, syntax: :scss)
201
+ render(syntax == :scss ? <<SCSS : <<SASS, :syntax => syntax)
202
+ x {
203
+ --variable: #{source};
204
+ }
205
+ SCSS
206
+ x
207
+ --variable: #{source}
208
+ SASS
103
209
  end
104
210
 
105
211
  def render(sass, options = {})
@@ -8,8 +8,6 @@ class EncodingTest < MiniTest::Test
8
8
  include Sass::Util::Test
9
9
 
10
10
  def test_encoding_error
11
- return skip "Can't be run on Ruby 1.8." if Sass::Util.ruby1_8?
12
-
13
11
  render("foo\nbar\nb\xFEaz".force_encoding("utf-8"))
14
12
  assert(false, "Expected exception")
15
13
  rescue Sass::SyntaxError => e
@@ -18,8 +16,6 @@ class EncodingTest < MiniTest::Test
18
16
  end
19
17
 
20
18
  def test_ascii_incompatible_encoding_error
21
- return skip "Can't be run on Ruby 1.8." if Sass::Util.ruby1_8?
22
-
23
19
  template = "foo\nbar\nb_z".encode("utf-16le")
24
20
  template[9] = "\xFE".force_encoding("utf-16le")
25
21
  render(template)
@@ -30,8 +26,6 @@ class EncodingTest < MiniTest::Test
30
26
  end
31
27
 
32
28
  def test_prefers_charset_to_ruby_encoding
33
- return skip "Can't be run on Ruby 1.8." if Sass::Util.ruby1_8?
34
-
35
29
  assert_renders_encoded(<<CSS, <<SASS.encode("IBM866").force_encoding("UTF-8"))
36
30
  @charset "UTF-8";
37
31
  fЖЖ {
@@ -44,8 +38,6 @@ SASS
44
38
  end
45
39
 
46
40
  def test_uses_ruby_encoding_without_charset
47
- return skip "Can't be run on Ruby 1.8." if Sass::Util.ruby1_8?
48
-
49
41
  assert_renders_encoded(<<CSS, <<SASS.encode("IBM866"))
50
42
  @charset "UTF-8";
51
43
  тАЬ {
@@ -57,8 +49,6 @@ SASS
57
49
  end
58
50
 
59
51
  def test_multibyte_charset_without_bom_declared_as_binary
60
- return skip "Can't be run on Ruby 1.8." if Sass::Util.ruby1_8?
61
-
62
52
  engine = Sass::Engine.new(<<SASS.encode("UTF-16LE").force_encoding("BINARY"))
63
53
  @charset "utf-16le"
64
54
  fóó
@@ -71,8 +61,6 @@ SASS
71
61
  end
72
62
 
73
63
  def test_multibyte_charset_without_bom_declared_as_utf_8
74
- return skip "Can't be run on Ruby 1.8." if Sass::Util.ruby1_8?
75
-
76
64
  engine = Sass::Engine.new(<<SASS.encode("UTF-16LE").force_encoding("UTF-8"))
77
65
  @charset "utf-16le"
78
66
  fóó
@@ -85,8 +73,6 @@ SASS
85
73
  end
86
74
 
87
75
  def test_utf_16le_with_bom
88
- return skip "Can't be run on Ruby 1.8." if Sass::Util.ruby1_8?
89
-
90
76
  assert_renders_encoded(<<CSS, <<SASS.encode("UTF-16LE").force_encoding("BINARY"))
91
77
  @charset "UTF-8";
92
78
  fóó {
@@ -98,8 +84,6 @@ SASS
98
84
  end
99
85
 
100
86
  def test_utf_16be_with_bom
101
- return skip "Can't be run on Ruby 1.8." if Sass::Util.ruby1_8?
102
-
103
87
  assert_renders_encoded(<<CSS, <<SASS.encode("UTF-16BE").force_encoding("BINARY"))
104
88
  @charset "UTF-8";
105
89
  fóó {
@@ -111,8 +95,6 @@ SASS
111
95
  end
112
96
 
113
97
  def test_utf_8_with_bom
114
- return skip "Can't be run on Ruby 1.8." if Sass::Util.ruby1_8?
115
-
116
98
  assert_renders_encoded(<<CSS, <<SASS.force_encoding("BINARY"))
117
99
  @charset "UTF-8";
118
100
  fóó {
@@ -124,8 +106,6 @@ SASS
124
106
  end
125
107
 
126
108
  def test_charset_with_multibyte_encoding
127
- return skip "Can't be run on Ruby 1.8." if Sass::Util.ruby1_8?
128
-
129
109
  engine = Sass::Engine.new(<<SASS)
130
110
  @charset "utf-32be"
131
111
  fóó
@@ -137,8 +117,6 @@ SASS
137
117
  end
138
118
 
139
119
  def test_charset_with_special_case_encoding
140
- return skip "Can't be run on Ruby 1.8." if Sass::Util.ruby1_8?
141
-
142
120
  # For some reason, a file with an ASCII-compatible UTF-16 charset
143
121
  # declaration is specced to be parsed as UTF-8.
144
122
  assert_renders_encoded(<<CSS, <<SASS.force_encoding("BINARY"))
@@ -153,8 +131,6 @@ SASS
153
131
  end
154
132
 
155
133
  def test_compressed_output_uses_bom
156
- return skip "Can't be run on Ruby 1.8." if Sass::Util.ruby1_8?
157
-
158
134
  assert_equal("\uFEFFfóó{a:b}\n", render(<<SASS, :style => :compressed))
159
135
  fóó
160
136
  a: b
@@ -167,19 +143,15 @@ SASS
167
143
  end
168
144
 
169
145
  def test_null_normalization
170
- return skip "Can't be run on Ruby 1.8." if Sass::Util.ruby1_8?
171
-
172
146
  assert_equal(<<CSS, render("/* foo\x00bar\x00baz */", :syntax => :scss))
173
- #{"@charset \"UTF-8\";\n" unless Sass::Util.ruby1_8?
174
- }/* foo�bar�baz */
147
+ @charset "UTF-8";
148
+ /* foo�bar�baz */
175
149
  CSS
176
150
  end
177
151
 
178
152
  # Regression
179
153
 
180
154
  def test_multibyte_prop_name
181
- return skip "Can't be run on Ruby 1.8." if Sass::Util.ruby1_8?
182
-
183
155
  assert_equal(<<CSS, render(<<SASS))
184
156
  @charset "UTF-8";
185
157
  #bar {
@@ -191,8 +163,6 @@ SASS
191
163
  end
192
164
 
193
165
  def test_multibyte_and_interpolation
194
- return skip "Can't be run on Ruby 1.8." if Sass::Util.ruby1_8?
195
-
196
166
  assert_equal(<<CSS, render(<<SCSS, :syntax => :scss))
197
167
  #bar {
198
168
  background: a 0%; }