OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [itcl/] [itcl/] [tests/] [mkindex.test] - Rev 1779

Go to most recent revision | Compare with Previous | Blame | View Log

#
# Tests for "auto_mkindex" and autoloading facility
# ----------------------------------------------------------------------
#   AUTHOR:  Michael J. McLennan
#            Bell Labs Innovations for Lucent Technologies
#            mmclennan@lucent.com
#            http://www.tcltk.com/itcl
#
#      RCS:  $Id: mkindex.test,v 1.1.1.1 2002-01-16 10:24:47 markom Exp $
# ----------------------------------------------------------------------
#            Copyright (c) 1993-1998  Lucent Technologies, Inc.
# ======================================================================
# See the file "license.terms" for information on usage and
# redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.

if {[string compare test [info procs test]] == 1} then {source defs}

# ----------------------------------------------------------------------
#  Test "auto_mkindex" in the presence of class definitions
# ----------------------------------------------------------------------
test mkindex-1.1 {remove any existing tclIndex file} {
    file delete tclIndex
    file exists tclIndex
} {0}

test mkindex-1.2 {build tclIndex based on a test file} {
    auto_mkindex . mkindex.itcl
    file exists tclIndex
} {1}

set element "{source [file join . mkindex.itcl]}"

test mkindex-1.3 {examine tclIndex} {
    namespace eval itcl_mkindex_tmp {
        set dir "."
        variable auto_index
        source tclIndex
        set result ""
        foreach elem [lsort [array names auto_index]] {
            lappend result [list $elem $auto_index($elem)]
        }
        set result
    }
} "{::Simple2::bump $element} {::Simple2::by $element} {::buried::deep::within $element} {::buried::ens $element} {::buried::inside $element} {::buried::inside::bump $element} {::buried::inside::by $element} {::buried::inside::find $element} {::buried::under::neath $element} {::top::find $element} {::top::notice $element} {OldStyle $element} {Simple1 $element} {Simple2 $element} {ens $element} {top $element}"

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.