diff options
author | Martin Gütlein <martin.guetlein@gmail.com> | 2010-01-13 09:37:59 +0100 |
---|---|---|
committer | Martin Gütlein <martin.guetlein@gmail.com> | 2010-01-13 09:37:59 +0100 |
commit | 3442fc5206c3c752263a723b962847807e30503a (patch) | |
tree | 3ce4b07d71eff5a7565f7b156ceed0efae5f836a /example.rb | |
parent | 374f215ff4ab670741eb799631a935f6066b4000 (diff) |
replace sqlite with configurable db
Diffstat (limited to 'example.rb')
-rw-r--r-- | example.rb | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -123,15 +123,26 @@ class Example end @@summary = "" + num = 0 + suc = 0 curl_calls.each do |cmd| + num += 1 log "testing: "+cmd + result = "" IO.popen(cmd.to_s+" 2> /dev/null") do |f| while line = f.gets - #response += indent.to_s+line + result += line end end - log ($?==0)?"ok":"failed" + result.gsub!(/\n/, " \\n ") + if ($?==0) + log "ok ( " +result.to_s[0,50]+" )" + suc += 1 + else + log "failed ( " +result.to_s[0,50]+" )" + end end + log num.to_s+"/"+num.to_s+" curls succeeded" @@summary end |