Skip to content
Tcl Source Code Artifact [a3a5286171]
Login

Artifact [a3a5286171]

Artifact a3a52861711ab9cc36b177bace52431cb7c6187687787c6affc3dd517f649167:


# Copyright © 2021 Nathan Coulter

# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.

if {"::tcltest" ni [namespace children]} {
    package require tcltest 2.5
    namespace import -force ::tcltest::*
}

::tcltest::loadTestedCommands
testConstraint testindexhex [expr {[namespace which testindexhex] ne {}}] 

test {list lindex} {} \
    -constraints testindexhex \
    -body {
	set list [testindexhex]
	lindex $list 731
    } -cleanup {
	catch {unset list}
    } -result 2db 


test {list lindex drill} {} \
    -constraints testindexhex \
    -body {
	set list [testindexhex]
	lindex $list 731 0 0 0
    } -cleanup {
	catch {unset list}
    } -result 2db 


test {list lrange} {} \
    -constraints testindexhex \
    -body {
	set list [testindexhex]
	lrange $list 10 15
    } -cleanup {
	catch {unset list}
    } -result {a b c d e f}


# cleanup
::tcltest::cleanupTests
return