#!/usr/local/bin/perl # # Test driver for Term::Query.pm # use Term::Query qw( query query_table query_table_set_defaults ); use Tester; require "Query_Test.pl"; @ARGV = ('all') unless @ARGV; $Term::Query::Force_Interactive = 1; # force interactive behaviour while ($_ = shift) { if (!index('-debug', $_)) { $Debug++; } elsif (!index('-details', $_)) { $Details++; } elsif (!index('-keep', $_)) { $KeepGoing++; } elsif (!index('-output', $_)) { $ShowOutput++; } elsif (!index('-help',$_)) { &usage; } else { $a = $_; run_class_test 'General' if grep(/^-?$a/i, qw( general all)); run_class_test 'Refs' if grep(/^-?$a/i, qw( refs references all)); run_class_test 'Defaults' if grep(/^-?$a/i, qw( defaults all )); run_class_test 'Tables' if grep(/^-?$a/i, qw( tables all )); run_class_test 'Subs' if grep(/^-?$a/i, qw( subs all )); } } exit; sub usage { print STDERR <