Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
14
Task/Test-a-function/Tcl/test-a-function.tcl
Normal file
14
Task/Test-a-function/Tcl/test-a-function.tcl
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
package require tcltest 2
|
||||
source palindrome.tcl; # Assume that this is what loads the implementation of ‘palindrome’
|
||||
|
||||
tcltest::test palindrome-1 {check for palindromicity} -body {
|
||||
palindrome abcdedcba
|
||||
} -result 1
|
||||
tcltest::test palindrome-2 {check for non-palindromicity} -body {
|
||||
palindrome abcdef
|
||||
} -result 0
|
||||
tcltest::test palindrome-3 {check for palindrome error} -body {
|
||||
palindrome
|
||||
} -returnCodes error -result "wrong # args: should be \"palindrome s\""
|
||||
|
||||
tcltest::cleanupTests
|
||||
Loading…
Add table
Add a link
Reference in a new issue