root/lang/ruby/starframe/bat/alltest-snarl.bat @ 28163

Revision 28163, 0.7 kB (checked in by isaisstillalive, 5 years ago)
  • 余計な出力があったので削除
Line 
1@echo off
2"C:\PROGRA~1\ruby-1.8\bin\ruby" -x "%~f0"
3@goto endofruby
4#!C:/PROGRA~1/ruby-1.8/bin/ruby
5require "rubygems"
6require "snarl"
7
8output = `alltest.bat`
9result = output.match(/(\d+ tests, \d+ assertions), ((\d+) failures, (\d+) errors)/)
10
11body  = result[1]
12if result[3] == "0" && result[4] == "0"
13  title = "Test All Grean"
14  icon  = File.join(File.dirname(__FILE__), "test_green.png")
15  timeout = 3
16  File.delete("test-error.log") if File.exist?("test-error.log")
17else
18  title ="Test Red"
19  body << "\n#{result[2]}"
20  icon  = File.join(File.dirname(__FILE__), "test_red.png")
21  timeout = 30
22  File.open("test-error.log", "w"){|f| f.write output }
23end
24
25Snarl.show_message(title, body, icon, timeout)
26__END__
27:endofruby
Note: See TracBrowser for help on using the browser.