Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cancel colours by adding reset at the end #1

Merged
merged 1 commit into from Jul 7, 2011
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions lib/a.rb
@@ -1,6 +1,6 @@
$n=Time.now;$f=[];$c=[];$a=0;class A;def a c;$a+=1;print c ?"\e[32m.\e[0m":($f\ at_exit{$c.map{|t|i=t.new;i.setup rescue 0;$t=t.instance_methods(!0).map{|m|i.\
<<caller[0];"\e[31mF\e[0m");end;def self.inherited(b);$c<<b;end;end;at_exit{$c\ send m if !(%w(setup teardown)&[m])[0]}.compact;i.teardown rescue 0};printf"\e\
.map{|t|i=t.new;i.setup rescue nil;$t=t.instance_methods(false).map{|m|i.send\ [0m\n%fs\n%d tests, %d assertions, %d failures\n\n%s",Time.now-$n,$t.size,$a,$f
m if !%w(setup teardown).include? m}.compact;i.teardown rescue nil};print "\n#{ .size,$f.map{|f|"\e[1;31mFailure\e[0m \e[97m@\e[33m #{f}\e[0m"}.join(?\n);exit\
Time.now-$n} s.\n#{$t.size} tests, #{$a} assertions, #{$f.size} failures\n\n"+ 1 if$f[0]};class A;def a c;$a+=1;print"\e[3"+(c ?"2m.":"1mF");$f<<caller[0]if !
$f.map{|f|"\e[31mFailure\e[0m \e[97m@\e[33m #{f}"}.join("\n");exit -1 if $f[0]} c;end;def A.inherited(b);$c<<b;end;end; $n = Time.now; $f = []; $c = []; $a = 0