hcatlin/sassc — pull request #11 by simi (2012-10-03 01:29:24+00:00)
Title: Print unified diff for failed tests and warnings.

It is hard to find what differs in failed tests. I made some quick diffing.

Before:

```bash
[retro@retro sassc (master=)]❤ make test
true
cd libsass; make
make[1]: Entering directory `/home/retro/work/fun/sassc/libsass'
ar rvs libsass.a context.o functions.o document.o document_parser.o eval_apply.o node.o node_factory.o node_emitters.o prelexer.o sass_interface.o
r - context.o
r - functions.o
r - document.o
r - document_parser.o
r - eval_apply.o
r - node.o
r - node_factory.o
r - node_emitters.o
r - prelexer.o
r - sass_interface.o
make[1]: Leaving directory `/home/retro/work/fun/sassc/libsass'
gcc -O2 -o bin/sassc sassc.o libsass/libsass.a -lstdc++ -lm
ruby spec.rb spec/basic/
Running tests in spec/basic/..

............................F...

31/32 Specs Passed!

-----WARN------
Problem with Ruby compat in spec/basic/16_hex_arithmetic/input.scss
-----WARN------
Problem with Ruby compat in spec/basic/22_colors_with_alpha/input.scss
-----WARN------
Problem with Ruby compat in spec/basic/24_namespace_properties/input.scss

================================
TEST FAILURES!

Failed test spec/basic/28_url

make: *** [test] Error 1

```

After:

```bash
[retro@retro sassc (test_diff)]❤ make test
true
cd libsass; make
make[1]: Entering directory `/home/retro/work/fun/sassc/libsass'
ar rvs libsass.a context.o functions.o document.o document_parser.o eval_apply.o node.o node_factory.o node_emitters.o prelexer.o sass_interface.o
r - context.o
r - functions.o
r - document.o
r - document_parser.o
r - eval_apply.o
r - node.o
r - node_factory.o
r - node_emitters.o
r - prelexer.o
r - sass_interface.o
make[1]: Leaving directory `/home/retro/work/fun/sassc/libsass'
gcc -O2 -o bin/sassc sassc.o libsass/libsass.a -lstdc++ -lm
ruby spec.rb spec/basic/
Running tests in spec/basic/..

...............................

31/32 Specs Passed!

-----WARN------
Problem with Ruby compat in spec/basic/16_hex_arithmetic/input.scss
--- spec/basic/16_hex_arithmetic/output.css	2012-10-02 23:58:11.073777571 +0200
+++ spec/basic/16_hex_arithmetic/sass_output.css	2012-10-03 03:01:40.602879405 +0200
@@ -6,7 +6,7 @@
p05: #aabbdd;
p06: #0101ff;
p07: blue;
- p08: aqua;
+ p08: cyan;
p09: #000000;
p10: black;
p11: black;
@@ -15,7 +15,7 @@
p14: black;
p15: 10-#222222;
p16: black;
- p17: fuchsia;
+ p17: magenta;
p18: 10 #232323;
p19: 10/#222222;
p20: #0b0a0b;

-----WARN------
Problem with Ruby compat in spec/basic/22_colors_with_alpha/input.scss
--- spec/basic/22_colors_with_alpha/output.css	2012-10-02 23:58:11.074777562 +0200
+++ spec/basic/22_colors_with_alpha/sass_output.css	2012-10-03 03:01:47.899811058 +0200
@@ -4,9 +4,9 @@
flah: #111111;
grah: rgba(255, 0, 238, 0.5);
blah: rgba(1, 2, 3, 0.6);
- floo: aqua;
+ floo: cyan;
bloo: rgba(0, 255, 255, 0.7);
- groo: aqua;
+ groo: cyan;
hoo: 123;
moo: 45;
poo: 6;

-----WARN------
Problem with Ruby compat in spec/basic/24_namespace_properties/input.scss

================================
TEST FAILURES!

Failed test spec/basic/28_url
--- spec/basic/28_url/output.css	2012-10-02 23:58:11.077777535 +0200
+++ spec/basic/28_url/sassc_output.css	2012-10-03 03:01:55.990735276 +0200
@@ -1,18 +1,18 @@
div {
- foo: url(bloo/blah.css);
- bar: url(http://foo/bar/hux.css);
- foo: url(fudgepop.css);
- bar: url("http://fudgepop/styles.css");
- hux: url(http://box_123////fudgepop.css);
- hux: url(http://box_123////fudgepop.css);
- foo: url(http://blah.com/bar-1.css);
- hux: url(http://box_123////fudgepop.css);
- foo: url(http://blah.com/bar-2.css);
- hux: url(http://box_123////fudgepop.css);
- foo: url(http://blah.com/bar-3.css);
- hux: url(http://box_123////fudgepop.css);
- foo: url(http://blah.com/bar-4.css);
- hux: url(http://box_123////fudgepop.css);
- foo: url(http://blah.com/bar-5.css);
- gloo: url("hey3.css");
- floo: url(hadoop-444.css); }
+ foo: url("bloo/blah.css");
+ bar: url("http://foo/bar/hux.css");
+ foo: url("fudge#{$x}.css");
+ bar: url("http://fudge#{$x}/styles.css");
+ hux: url("http://box_#{$y}////fudge#{$x}.css");
+ hux: url("http://box_#{$y}////fudge#{$x}.css");
+ foo: url("http://blah.com/bar-#{$i}.css");
+ hux: url("http://box_#{$y}////fudge#{$x}.css");
+ foo: url("http://blah.com/bar-#{$i}.css");
+ hux: url("http://box_#{$y}////fudge#{$x}.css");
+ foo: url("http://blah.com/bar-#{$i}.css");
+ hux: url("http://box_#{$y}////fudge#{$x}.css");
+ foo: url("http://blah.com/bar-#{$i}.css");
+ hux: url("http://box_#{$y}////fudge#{$x}.css");
+ foo: url("http://blah.com/bar-#{$i}.css");
+ gloo: url("hey#{1+2}.css");
+ floo: url("hadoop-#{$y+321}.css"); }

make: *** [test] Error 1
[retro@retro sassc (test_diff)]❤
[retro@retro sassc (test_diff)]❤ make test
true
cd libsass; make
make[1]: Entering directory `/home/retro/work/fun/sassc/libsass'
ar rvs libsass.a context.o functions.o document.o document_parser.o eval_apply.o node.o node_factory.o node_emitters.o prelexer.o sass_interface.o
r - context.o
r - functions.o
r - document.o
r - document_parser.o
r - eval_apply.o
r - node.o
r - node_factory.o
r - node_emitters.o
r - prelexer.o
r - sass_interface.o
make[1]: Leaving directory `/home/retro/work/fun/sassc/libsass'
gcc -O2 -o bin/sassc sassc.o libsass/libsass.a -lstdc++ -lm
ruby spec.rb spec/basic/
Running tests in spec/basic/..

...............................

31/32 Specs Passed!

-----WARN------
Problem with Ruby compat in spec/basic/16_hex_arithmetic/input.scss
--- spec/basic/16_hex_arithmetic/output.css	2012-10-02 23:58:11.073777571 +0200
+++ spec/basic/16_hex_arithmetic/sass_output.css	2012-10-03 03:23:03.261801818 +0200
@@ -6,7 +6,7 @@
p05: #aabbdd;
p06: #0101ff;
p07: blue;
- p08: aqua;
+ p08: cyan;
p09: #000000;
p10: black;
p11: black;
@@ -15,7 +15,7 @@
p14: black;
p15: 10-#222222;
p16: black;
- p17: fuchsia;
+ p17: magenta;
p18: 10 #232323;
p19: 10/#222222;
p20: #0b0a0b;

-----WARN------
Problem with Ruby compat in spec/basic/22_colors_with_alpha/input.scss
--- spec/basic/22_colors_with_alpha/output.css	2012-10-02 23:58:11.074777562 +0200
+++ spec/basic/22_colors_with_alpha/sass_output.css	2012-10-03 03:23:10.405734289 +0200
@@ -4,9 +4,9 @@
flah: #111111;
grah: rgba(255, 0, 238, 0.5);
blah: rgba(1, 2, 3, 0.6);
- floo: aqua;
+ floo: cyan;
bloo: rgba(0, 255, 255, 0.7);
- groo: aqua;
+ groo: cyan;
hoo: 123;
moo: 45;
poo: 6;

-----WARN------
Problem with Ruby compat in spec/basic/24_namespace_properties/input.scss

-----WARN------
Problem with Ruby compat in spec/basic/28_url/input.scss
--- spec/basic/28_url/output.css	2012-10-02 23:58:11.077777535 +0200
+++ spec/basic/28_url/sassc_output.css	2012-10-03 03:23:18.375658952 +0200
@@ -1,18 +1,18 @@
div {
- foo: url(bloo/blah.css);
- bar: url(http://foo/bar/hux.css);
- foo: url(fudgepop.css);
- bar: url("http://fudgepop/styles.css");
- hux: url(http://box_123////fudgepop.css);
- hux: url(http://box_123////fudgepop.css);
- foo: url(http://blah.com/bar-1.css);
- hux: url(http://box_123////fudgepop.css);
- foo: url(http://blah.com/bar-2.css);
- hux: url(http://box_123////fudgepop.css);
- foo: url(http://blah.com/bar-3.css);
- hux: url(http://box_123////fudgepop.css);
- foo: url(http://blah.com/bar-4.css);
- hux: url(http://box_123////fudgepop.css);
- foo: url(http://blah.com/bar-5.css);
- gloo: url("hey3.css");
- floo: url(hadoop-444.css); }
+ foo: url("bloo/blah.css");
+ bar: url("http://foo/bar/hux.css");
+ foo: url("fudge#{$x}.css");
+ bar: url("http://fudge#{$x}/styles.css");
+ hux: url("http://box_#{$y}////fudge#{$x}.css");
+ hux: url("http://box_#{$y}////fudge#{$x}.css");
+ foo: url("http://blah.com/bar-#{$i}.css");
+ hux: url("http://box_#{$y}////fudge#{$x}.css");
+ foo: url("http://blah.com/bar-#{$i}.css");
+ hux: url("http://box_#{$y}////fudge#{$x}.css");
+ foo: url("http://blah.com/bar-#{$i}.css");
+ hux: url("http://box_#{$y}////fudge#{$x}.css");
+ foo: url("http://blah.com/bar-#{$i}.css");
+ hux: url("http://box_#{$y}////fudge#{$x}.css");
+ foo: url("http://blah.com/bar-#{$i}.css");
+ gloo: url("hey#{1+2}.css");
+ floo: url("hadoop-#{$y+321}.css"); }

================================
TEST FAILURES!

Failed test spec/basic/28_url

make: *** [test] Error 1

```