cmdr
Check-in [e8bf343c87]
Not logged in

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 Unified Diffs Ignore Whitespace Patch

Added tests/tty.test.













































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# -*- tcl -*- tcl.tk//DSL tcltest//EN//2.0
# # ## ### ##### ######## ############# #####################
## Testing the cmdr::tty package.

kt check Tcl     8.5
kt check tcltest 2

kt require support Tclx
kt require support debug
kt require support debug::caller

kt local   testing cmdr::tty

# # ## ### ##### ######## ############# #####################
## Basic wrong#args checks.

test cmdr-tty-1.0 {tty, wrong num args, not enough} -body {
    cmdr tty
} -returnCodes error \
    -result {wrong # args: should be "cmdr tty subcommand ?argument ...?"}

test cmdr-tty-1.1 {tty, bogus sub-command} -body {
    cmdr tty foo
} -returnCodes error \
    -result {unknown or ambiguous subcommand "foo": must be stdout}

test cmdr-tty-1.2 {tty stdout, wrong num args, too many} -body {
    cmdr tty stdout X
} -returnCodes error \
    -result {wrong # args: should be "cmdr tty stdout"}

# # ## ### ##### ######## ############# #####################
## No other checks, as we cannot really assume whether the tests run
## from a terminal or not.

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

Changes to tty.tcl.

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

# # ## ### ##### ######## #############
package provide tty 0







|
53
54
55
56
57
58
59
60
    proc ::cmdr::tty::stdout {} {
	debug.cmdr/tty {-- unix/osx --}
	fstat stdout tty
    }
}

# # ## ### ##### ######## #############
package provide cmdr::tty 0