|
8 | 8 | use Test::More;
|
9 | 9 | }
|
10 | 10 |
|
| 11 | +use Test::Differences; |
11 | 12 | use Test::More tests => 40;
|
12 | 13 |
|
13 | 14 | BEGIN { use_ok('CSS::Sass') };
|
@@ -166,13 +167,13 @@ is(
|
166 | 167 | my ($r, $err) = CSS::Sass::sass_compile(
|
167 | 168 | '
|
168 | 169 | @mixin test_comp_op($a, $b) {
|
169 |
| - // /*! #{inspect(op_and($a, $b))} == #{($a and $b)} */ |
170 |
| - // test-and: op_and($a, $b) == ($a and $b); |
171 |
| - // test-custom: inspect(op_and($a, $b)); |
| 170 | + /*! #{inspect(op_and($a, $b))} == #{($a and $b)} */ |
| 171 | + test-and: op_and($a, $b) == ($a and $b); |
| 172 | + test-custom: inspect(op_and($a, $b)); |
172 | 173 | test-native: inspect(($a and $b));
|
173 |
| - // /*! #{inspect(op_or($a, $b))} == #{($a or $b)} */ |
174 |
| - // test-or: op_or($a, $b) == ($a or $b); |
175 |
| - // test-custom: inspect(op_or($a, $b)); |
| 174 | + /*! #{inspect(op_or($a, $b))} == #{($a or $b)} */ |
| 175 | + test-or: op_or($a, $b) == ($a or $b); |
| 176 | + test-custom: inspect(op_or($a, $b)); |
176 | 177 | test-native: inspect(($a or $b));
|
177 | 178 | /*! #{inspect(op_eq($a, $b))} == #{($a == $b)} */
|
178 | 179 | test-eq: op_eq($a, $b) == ($a == $b);
|
@@ -256,7 +257,13 @@ my ($r, $err) = CSS::Sass::sass_compile(
|
256 | 257 |
|
257 | 258 | my $expected = <<END_OF_EXPECTED;
|
258 | 259 | numbers {
|
| 260 | + /*! 42 == 42 */ |
| 261 | + test-and: true; |
| 262 | + test-custom: 42; |
259 | 263 | test-native: 42;
|
| 264 | + /*! 42px == 42px */ |
| 265 | + test-or: true; |
| 266 | + test-custom: 42px; |
260 | 267 | test-native: 42px;
|
261 | 268 | /*! true == true */
|
262 | 269 | test-eq: true;
|
@@ -332,5 +339,5 @@ booleans {
|
332 | 339 | test-native: true/false; }
|
333 | 340 | END_OF_EXPECTED
|
334 | 341 |
|
335 |
| -is ($r, $expected, "big custom operation test"); |
| 342 | +eq_or_diff ($r, $expected, "big custom operation test"); |
336 | 343 | is ($err, undef, "big custom operation test has no error");
|
0 commit comments