# ===========================================================================
# File: "TclABTestSuite.tcl"
#                        Created: 2009-03-02 07:59:01
#              Last modification: 2009-03-04 09:15:51
# Author: Bernard Desgraupes
# e-mail: <bdesgraupes@users.sourceforge.net>
# www: <http://tcladdressbook.sourceforge.net>
# (c) Copyright: Bernard Desgraupes 2004-2009
# All rights reserved.
# ===========================================================================
# Test suite for the Tcl [addressbook] command defined 
# in the Tcladdressbook extension.
# It requires a Tcl installation (8.5 or greater) with the tcltest
# extension (2.2 or greater).
# 
# To test the suite, just source this file with tclsh:
#     shell> tclsh TclABTestSuite.tcl
# 
# 
# NB: all the test files must end by an instruction
# 	 ::tcltest::cleanupTests 1
# otherwise the counts will all return 0 since, by default, they are all
# executed in separate processes. Another possibility is to run everything
# in a single process by adding the following configure option below
#    configure -singleproc 1


package require Tcl 8.4

if {[lsearch [namespace children] ::tcltest] == -1} {
	# (bd 2008-11-15) Currently this runs version 2.3.0 found in
	# /opt/local/lib/tcl8/8.5/tcltest-2.3.0.tm
	package require tcltest 2.2
}

namespace import tcltest::*

configure -testdir [file dirname [file normalize [info script]]] 
configure -singleproc 1
if {[info exists argv]} {
	configure {*}$argv
} 


puts stdout "Tcl $tcl_patchLevel interpreter"

# Now execute the tests for each command
runAllTests

