# -*- tcl -*-
# soundex.test:  tests for the soundex commands.
#
# This file contains a collection of tests for one or more of the Tcl
# built-in commands.  Sourcing this file into Tcl runs the tests and
# generates output for errors.  No output means no errors were found.
#
# Copyright (c) 2003 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
#
# RCS: @(#) $Id: soundex.test,v 1.5 2006/10/09 21:41:42 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 1.0

testing {
    useLocal soundex.tcl soundex
}

# -------------------------------------------------------------------------

namespace import ::soundex::knuth

# -------------------------------------------------------------------------

foreach {n in out} {
    1.0 Euler       E460
    1.1 Gauss       G200
    1.2 Hilbert     H416
    1.3 Knuth       K530
    1.4 Lloyd       L300
    1.5 Lukasiewicz L222
} {
    test soundex-$n {knuth soundex} {
	::soundex::knuth $in
    } $out
}

# -------------------------------------------------------------------------
testsuiteCleanup
