# -*- tcl -*- tcl.tk//DSL tcltest//EN//2.0
# # ## ### ##### ######## ############# #####################
## cmdr.test:  tests for the cmdr package

kt check Tcl     8.5
kt check tcltest 2

kt require support TclOO
kt require support oo::util 1.2
kt require support struct::queue
kt require support try
kt require support lambda
kt require support linenoise
kt require support linenoise::repl
kt require support linenoise::facade
kt require support string::token::shell 1.1
kt require support textutil::adjust
kt require support term::ansi::code::ctrl
kt require support debug
kt require support debug::caller

kt local   support cmdr::util
kt local   support cmdr::help

kt local   support cmdr::parameter
kt local   support cmdr::config
kt local   support cmdr::actor
kt local   support cmdr::private
kt local   support cmdr::officer

kt local   testing cmdr

# # ## ### ##### ######## ############# #####################
## Get the support

::kt source support.tcl

# We do not want various tests to invoke a command loop.  But
# uncommenting the next line serves as test that the class flag is
# properly taken, by causing exactly that.
#cmdr::config interactive 1

# # ## ### ##### ######## ############# #####################

::kt source main.tests      ; # Entrypoints.
::kt source officer.tests   ; # Action DSL
::kt source private.tests   ; # Parameter DSL, collection
::kt source parameter.tests ; # Parameter DSL, details
::kt source runtime.tests   ; # Runtime command line parsing
::kt source help.tests      ; # Help structures & formatting

# TODO: keys, get (super chain)

# # ## ### ##### ######## ############# #####################
cleanupTests
return
