From 3442fc5206c3c752263a723b962847807e30503a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20G=C3=BCtlein?= Date: Wed, 13 Jan 2010 09:37:59 +0100 Subject: replace sqlite with configurable db --- example.rb | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'example.rb') diff --git a/example.rb b/example.rb index eb424b1..1e27077 100644 --- a/example.rb +++ b/example.rb @@ -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 -- cgit v1.2.3