From d004875c53f756f9f09c69ef90b3484e23bc5760 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 10 May 2008 01:42:14 -0400 Subject: some re-arrangement related to sqlite3 testing (including a rudimentary sql import file, dbi by-pass) --- lib/sisu/v0/db_tests.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/sisu/v0/db_tests.rb') diff --git a/lib/sisu/v0/db_tests.rb b/lib/sisu/v0/db_tests.rb index 73e0400f..72282b59 100644 --- a/lib/sisu/v0/db_tests.rb +++ b/lib/sisu/v0/db_tests.rb @@ -64,9 +64,9 @@ module SiSU_DB_tests def initialize(info,opt) @ck,@opt=info,opt unless @opt.cmd =~/q/ - puts @ck.tp[:fns] - puts @ck.tp[:title] - puts @ck.tp[:creator] if @ck.tp[:creator] + puts @ck.tp[:fns] if @ck.tp[:fns] and not @ck.tp[:fns].empty? + puts @ck.tp[:title] if @ck.tp[:title] and not @ck.tp[:title].empty? + puts @ck.tp[:creator] if @ck.tp[:creator] and not @ck.tp[:creator].empty? end end def verify @@ -109,7 +109,7 @@ module SiSU_DB_tests puts @ck.tp[:dewey].length.to_s + ' checklength ' + @ck.tp[:dewey] if @ck.tp[:dewey] and @ck.tp[:dewey].length >@ck.lt_dewey puts @ck.tp[:isbn].length.to_s + ' checklength ' + @ck.tp[:isbn] if @ck.tp[:isbn] and @ck.tp[:isbn].length >@ck.lt_isbn puts @ck.tp[:pg].length.to_s + ' checklength ' + @ck.tp[:pg] if @ck.tp[:pg] and @ck.tp[:pg].length >@ck.lt_pg - puts @ck.tp[:date] if @ck.tp[:date] !~/\d\d-\d\d-\d\d/ + puts @ck.tp[:date] if @ck.tp[:date] and not @ck.tp[:date].empty? and @ck.tp[:date] !~/\d\d-\d\d-\d\d/ end end end -- cgit v1.2.3