cmdr
Check-in [e8bf343c87]
Not logged in
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:cmdr::tty - Fixed package provision typo, plus testsuite for same.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e8bf343c8743cf13c5c0b46fa9d8e7f8e3442df3
User & Date: aku 2014-05-23 06:19:14
References
2014-05-23
22:17 Ticket [8502a858bd] Add facility for colorization status still Closed with 3 other changes artifact: 2239702142 user: aku
22:17 Closed ticket [8502a858bd]. artifact: 26dcf622de user: aku
Context
2014-05-23
07:13
cmdr::color - Fixed issues, expanded functionality, better checking. Plus testsuite. check-in: ddd5e520dd user: aku tags: trunk
06:19
cmdr::tty - Fixed package provision typo, plus testsuite for same. check-in: e8bf343c87 user: aku tags: trunk
06:17
Brought tests uptodate regarding the recent code extensions and changes. check-in: b35f9a1c77 user: aku tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Added tests/tty.test.

            1  +# -*- tcl -*- tcl.tk//DSL tcltest//EN//2.0
            2  +# # ## ### ##### ######## ############# #####################
            3  +## Testing the cmdr::tty package.
            4  +
            5  +kt check Tcl     8.5
            6  +kt check tcltest 2
            7  +
            8  +kt require support Tclx
            9  +kt require support debug
           10  +kt require support debug::caller
           11  +
           12  +kt local   testing cmdr::tty
           13  +
           14  +# # ## ### ##### ######## ############# #####################
           15  +## Basic wrong#args checks.
           16  +
           17  +test cmdr-tty-1.0 {tty, wrong num args, not enough} -body {
           18  +    cmdr tty
           19  +} -returnCodes error \
           20  +    -result {wrong # args: should be "cmdr tty subcommand ?argument ...?"}
           21  +
           22  +test cmdr-tty-1.1 {tty, bogus sub-command} -body {
           23  +    cmdr tty foo
           24  +} -returnCodes error \
           25  +    -result {unknown or ambiguous subcommand "foo": must be stdout}
           26  +
           27  +test cmdr-tty-1.2 {tty stdout, wrong num args, too many} -body {
           28  +    cmdr tty stdout X
           29  +} -returnCodes error \
           30  +    -result {wrong # args: should be "cmdr tty stdout"}
           31  +
           32  +# # ## ### ##### ######## ############# #####################
           33  +## No other checks, as we cannot really assume whether the tests run
           34  +## from a terminal or not.
           35  +
           36  +# # ## ### ##### ######## ############# #####################
           37  +cleanupTests
           38  +return

Changes to tty.tcl.

    53     53       proc ::cmdr::tty::stdout {} {
    54     54   	debug.cmdr/tty {-- unix/osx --}
    55     55   	fstat stdout tty
    56     56       }
    57     57   }
    58     58   
    59     59   # # ## ### ##### ######## #############
    60         -package provide tty 0
           60  +package provide cmdr::tty 0