# -------------------------------------------------------
# File: "TclABCommonTests.tcl"
#                        Created: 2004-09-07 15:36:35
#              Last modification: 2009-03-07 17:36:57
# Author: Bernard Desgraupes
# e-mail: <bdesgraupes@users.sourceforge.net.fr>
# www: <http://tcladdressbook.sourceforge.net>
# (c) Copyright: Bernard Desgraupes, 2004-2009
# All rights reserved.
# This software is free software with BSD licence.
# Versions history: see the Changes.Log file.
# 
# Test suite for the Tcl [addressbook] command defined 
# in the Tcladdressbook extension.
# 
# -------------------------------------------------------

# Check that we are on OSX
if {$tcl_platform(platform) != "unix" || $tcl_platform(os) != "Darwin"} {
	puts stdout "The Tcladdressbook extension is for the Mac OS X platform only. Exiting now."
	return
} 

package require Tcl 8.4

if {[lsearch [namespace children] ::tcltest] == -1} {
	package require tcltest 2.2
}

namespace eval ::addressbook::test {
	
	variable initialized
	if {![info exists initialized]} {
		set initialized 0
	}
	
	if {$initialized} {
		return
	}

	variable PersonNum 0
	variable GroupNum 0
	variable SubGroupNum 0

	set initialized 1
}

global auto_path
lappend auto_path /System/Library/Tcl
set tclabVersion [package require addressbook 1.2.2]
puts stdout "Tests suite executed with Tcladdressbook $tclabVersion"

package require Tclx
