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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [itcl/] [itcl/] [tests/] [mkindex.test] - Blame information for rev 1773

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

Line No. Rev Author Line
1 578 markom
#
2
# Tests for "auto_mkindex" and autoloading facility
3
# ----------------------------------------------------------------------
4
#   AUTHOR:  Michael J. McLennan
5
#            Bell Labs Innovations for Lucent Technologies
6
#            mmclennan@lucent.com
7
#            http://www.tcltk.com/itcl
8
#
9
#      RCS:  $Id: mkindex.test,v 1.1.1.1 2002-01-16 10:24:47 markom Exp $
10
# ----------------------------------------------------------------------
11
#            Copyright (c) 1993-1998  Lucent Technologies, Inc.
12
# ======================================================================
13
# See the file "license.terms" for information on usage and
14
# redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
15
 
16
if {[string compare test [info procs test]] == 1} then {source defs}
17
 
18
# ----------------------------------------------------------------------
19
#  Test "auto_mkindex" in the presence of class definitions
20
# ----------------------------------------------------------------------
21
test mkindex-1.1 {remove any existing tclIndex file} {
22
    file delete tclIndex
23
    file exists tclIndex
24
} {0}
25
 
26
test mkindex-1.2 {build tclIndex based on a test file} {
27
    auto_mkindex . mkindex.itcl
28
    file exists tclIndex
29
} {1}
30
 
31
set element "{source [file join . mkindex.itcl]}"
32
 
33
test mkindex-1.3 {examine tclIndex} {
34
    namespace eval itcl_mkindex_tmp {
35
        set dir "."
36
        variable auto_index
37
        source tclIndex
38
        set result ""
39
        foreach elem [lsort [array names auto_index]] {
40
            lappend result [list $elem $auto_index($elem)]
41
        }
42
        set result
43
    }
44
} "{::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}"

powered by: WebSVN 2.1.0

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