# -*- 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 # # RCS: @(#) $Id: soundex.test,v 1.1 2003/04/01 21:24:21 andreas_kupries Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest namespace import ::tcltest::* } package require soundex puts "soundex [package present 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 } ::tcltest::cleanupTests