marick/lein-midje

Colorized output broken under Windows with lein-midje 1.0.6

Closed this issue · 5 comments

ath commented

I get the following outputs under Windows 7, 64 Bit:

lein-midje 1.0.6
M:\project>lein midje
←[32mAll claimed facts (0) have been confirmed.←[0m

Under 1.0.5 I had a readable output, without those arrows and brackets and numbers and m letters.

This is because of the addition of ANSI terminal codes for color. In 1.0.5, summaries weren't colorized, but they are in 1.0.6.

Did any color appear when you used 1.0.5? (Specifically red for failures and cyan for future-facts)

Do unix tools that colorize generally work under windows?

ath commented

Perhaps it would make sense to incorporate the (System/getProperty "os.name") somehow. For Windows 7 this returns "Windows 7". It would be preferrable to have no color at all, over these "←[0m" output things.

ath commented

I never saw colorized outputs so far. I have some GNU Utils installed on my machine. But when I do for example
ls -la --color then I get some similar results, all grey on black:

C:\Windows>ls -la --color
←[0mtotal 17812
drw-rw-rw-     59 ath 0   16384 2011-10-13 15:19 ←[01;34m.←[0m
drw-rw-rw-     25 ath 0   16384 2011-11-24 14:18 ←[01;34m..←[0m
drw-rw-rw-      2 ath 0       0 2009-07-14 07:32 ←[01;34maddins←[0m
drw-rw-rw-      3 ath 0       0 2009-07-14 05:20 ←[01;34mAppCompat←[0m
drw-rw-rw-      6 ath 0    4096 2011-10-10 17:53 ←[01;34mAppPatch←[0m
-rw-rw-rw-      1 ath 0   19444 2011-10-10 14:49 ←[0mAscd_tmp.ini←[0m
dr--r--r--     12 ath 0    4096 2011-10-12 13:08 ←[01;34massembly←[0m
-rwxrwxrwx      2 ath 0   71168 2010-11-21 04:24 ←[01;32mbfsvc.exe←[0m
...

So, I have a file l.bat that just calls ls -la, without the --color option, and this gives uncolored but readable outputs.

If you get Midje 1.3.1-SNAPSHOT and lein-midje 1.0.7, I think you'll get no attempts-at-color on Windows. Let me know if it works and I'll merge the changes into 1.3.0-RC4.

On Dec 7, 2011, at 1:09 PM, André Thieme wrote:

Perhaps it would make sense to incorporate the (System/getProperty "os.name") somehow. For Windows 7 this returns "Windows 7".


Reply to this email directly or view it on GitHub:
#7 (comment)


Brian Marick, Artisanal Labrador
Now working at http://path11.com
Contract programming in Ruby and Clojure
Occasional consulting on Agile

ath commented

The lein-midje 1.0.7 plugin fixes the issue under Windows 7, thanks :-)