diff options
author | andreas_kupries <akupries@shaw.ca> | 2003-06-09 22:48:32 (GMT) |
---|---|---|
committer | andreas_kupries <akupries@shaw.ca> | 2003-06-09 22:48:32 (GMT) |
commit | 2de53852436287ca9c97b41636e38df538506625 (patch) | |
tree | 9f56d3de04d71da41a5b38e81e4714993d4d0af1 /tests/config.test | |
parent | a8853bfaf368294f76dbe7dba99f5f111377f618 (diff) | |
download | tcl-2de53852436287ca9c97b41636e38df538506625.zip tcl-2de53852436287ca9c97b41636e38df538506625.tar.gz tcl-2de53852436287ca9c97b41636e38df538506625.tar.bz2 |
* generic/tcl.decls: Ported the changes from the
* generic/tcl.h: 'tip-59-implementation' branch into the CVS
* generic/tclBasic.c: head. Regenerated stub table. Regenerated
* generic/tclInt.h: the configure's scripts, with help from Joe
* generic/tclDecls.h English.
* generic/tclStubInit.c:
* generic/tclConfig.c:
* generic/tclPkgConfig.c:
* unix/Makefile.in:
* unix/configure.in: The changes in the windows section are not
* unix/tcl.m4: yet committed, they await feedback from
* unix/mkLinks: David Gravereaux.
* doc/RegConfig.3:
* mac/tclMacPkgConfig.c:
* tests/config.test:
Diffstat (limited to 'tests/config.test')
-rw-r--r-- | tests/config.test | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/tests/config.test b/tests/config.test new file mode 100644 index 0000000..c1fa524 --- /dev/null +++ b/tests/config.test @@ -0,0 +1,81 @@ +# -*- tcl -*- +# Commands covered: pkgconfig +# +# 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) 1991-1993 The Regents of the University of California. +# Copyright (c) 1994-1996 Sun Microsystems, Inc. +# Copyright (c) 1998-1999 by Scriptics Corporation. +# +# See the file "license.terms" for information on usage and redistribution +# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# +# RCS: @(#) $Id: config.test,v 1.2 2003/06/09 22:49:44 andreas_kupries Exp $ + +if {[lsearch [namespace children] ::tcltest] == -1} { + package require tcltest + namespace import -force ::tcltest::* +} + +test pkgconfig-1.1 {query keys} { + lsort [::tcl::pkgconfig list] +} {64bit bindir,install bindir,runtime compile_debug compile_stats debug docdir,install docdir,runtime includedir,install includedir,runtime libdir,install libdir,runtime mem_debug optimized profiled scriptdir,install scriptdir,runtime threaded} + +test pkgconfig-1.2 {query keys multiple times} { + string compare [::tcl::pkgconfig list] [::tcl::pkgconfig list] +} 0 + +test pkgconfig-1.3 {query value multiple times} { + string compare \ + [::tcl::pkgconfig get bindir,install] \ + [::tcl::pkgconfig get bindir,install] +} 0 + + +test pkgconfig-2.0 {error: missing subcommand} { + catch {::tcl::pkgconfig} msg + set msg +} {wrong # args: should be "list | get key"} + +test pkgconfig-2.1 {error: illegal subcommand} { + catch {::tcl::pkgconfig foo} msg + set msg +} {bad subcommand "foo": must be get or list} + +test pkgconfig-2.2 {error: list with arguments} { + catch {::tcl::pkgconfig list foo} msg + set msg +} {wrong # args: should be "list"} + +test pkgconfig-2.3 {error: get without arguments} { + catch {::tcl::pkgconfig get} msg + set msg +} {wrong # args: should be "get key"} + +test pkgconfig-2.4 {error: query unknown key} { + catch {::tcl::pkgconfig get foo} msg + set msg +} {key not known} + +test pkgconfig-2.5 {error: query with to many arguments} { + catch {::tcl::pkgconfig get foo bar} msg + set msg +} {wrong # args: should be "list | get key"} + +# cleanup +::tcltest::cleanupTests +return + + + + + + + + + + + + |