home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tcl2-73c.zip / tcl7.3 / tests / errors < prev    next >
Text File  |  1994-03-14  |  7KB  |  275 lines

  1. append.test
  2. async.test
  3. case.test
  4. cd.test
  5. exec not supported under os/2
  6. cmdinfo.test
  7. concat.test
  8. dcall.test
  9. defs
  10. dstring.test
  11. env.test
  12. Skipping env tests:  need "printenv" to read environment.
  13. error.test
  14. eval.test
  15. expr.test
  16. file.test
  17. exec not supported under os/2
  18. for.test
  19. format.test
  20.  
  21.  
  22. ==== format-5.3 floating-point zeroes
  23. ==== Contents of test case:
  24.  
  25.     format "%#.4e %#.4f %#.4g" 0.0 0.0 0.0 0.0
  26.  
  27. ==== Result was:
  28. 0.0000e+00 0.0000 0.0000
  29. ---- Result should have been:
  30. 0.0000e+00 0.0000 0.000
  31. ---- format-5.3 FAILED
  32.  
  33.  
  34. ==== format-5.5 floating-point zeroes
  35. ==== Contents of test case:
  36.  
  37.     format "%#.0e %#.0f %#.0g" 0.0 0.0 0.0 0.0
  38.  
  39. ==== Result was:
  40. 0.e+00 0. 0.0
  41. ---- Result should have been:
  42. 0.e+00 0. 0.
  43. ---- format-5.5 FAILED
  44. glob.test
  45. exec not supported under os/2
  46. history.test
  47. if.test
  48. incr.test
  49. info.test
  50. exec not supported under os/2
  51. join.test
  52. lindex.test
  53. link.test
  54. linsert.test
  55. list.test
  56. llength.test
  57. lrange.test
  58. lreplace.test
  59. lsearch.test
  60. lsort.test
  61. misc.test
  62. open.test
  63. exec not supported under os/2
  64. parse.test
  65. pid.test
  66.  
  67.  
  68. ==== open-1.2 pid command
  69. ==== Contents of test case:
  70.  
  71.     set f [open {| echo foo | cat > /dev/null} w]
  72.     set pids [pid $f]
  73.     close $f
  74.     list [llength $pids] [regexp {^[0-9]+$} [lindex $pids 0]]  [regexp {^[0-9]+$} [lindex $pids 1]]  [expr {[lindex $pids 0] == [lindex $pids 1]}]
  75.  
  76. ==== Test generated error:
  77.  
  78. proc.test
  79.  
  80.  
  81. ==== proc-7.11 return with special completion code
  82. ==== Contents of test case:
  83.  
  84.     proc tproc2 {} {
  85.     global errorCode errorInfo
  86.     catch {open _bad_file_name r} msg
  87.     return -code error -errorinfo $errorInfo -errorcode $errorCode $msg
  88.     }
  89.     string tolower [list [catch tproc2 msg] $msg $errorInfo $errorCode]
  90.  
  91. ==== Result was:
  92. 1 {couldn't open "_bad_file_name": the file or directory specified cannot be found.} {couldn't open "_bad_file_name": the file or directory specified cannot be found.
  93.     while executing
  94. "open _bad_file_name r"
  95.     invoked from within
  96. "tproc2"} {posix enoent {the file or directory specified cannot be found.}}
  97. ---- Result should have been:
  98. 1 {couldn't open "_bad_file_name": no such file or directory} {couldn't open "_bad_file_name": no such file or directory
  99.     while executing
  100. "open _bad_file_name r"
  101.     invoked from within
  102. "tproc2"} {posix enoent {no such file or directory}}
  103. ---- proc-7.11 FAILED
  104.  
  105.  
  106. ==== proc-7.12 return with special completion code
  107. ==== Contents of test case:
  108.  
  109.     proc tproc2 {} {
  110.     global errorCode errorInfo
  111.     catch {open _bad_file_name r} msg
  112.     return -code error -errorcode $errorCode $msg
  113.     }
  114.     string tolower [list [catch tproc2 msg] $msg $errorInfo $errorCode]
  115.  
  116. ==== Result was:
  117. 1 {couldn't open "_bad_file_name": the file or directory specified cannot be found.} {couldn't open "_bad_file_name": the file or directory specified cannot be found.
  118.     while executing
  119. "tproc2"} {posix enoent {the file or directory specified cannot be found.}}
  120. ---- Result should have been:
  121. 1 {couldn't open "_bad_file_name": no such file or directory} {couldn't open "_bad_file_name": no such file or directory
  122.     while executing
  123. "tproc2"} {posix enoent {no such file or directory}}
  124. ---- proc-7.12 FAILED
  125.  
  126.  
  127. ==== proc-7.13 return with special completion code
  128. ==== Contents of test case:
  129.  
  130.     proc tproc2 {} {
  131.     global errorCode errorInfo
  132.     catch {open _bad_file_name r} msg
  133.     return -code error -errorinfo $errorInfo $msg
  134.     }
  135.     string tolower [list [catch tproc2 msg] $msg $errorInfo $errorCode]
  136.  
  137. ==== Result was:
  138. 1 {couldn't open "_bad_file_name": the file or directory specified cannot be found.} {couldn't open "_bad_file_name": the file or directory specified cannot be found.
  139.     while executing
  140. "open _bad_file_name r"
  141.     invoked from within
  142. "tproc2"} none
  143. ---- Result should have been:
  144. 1 {couldn't open "_bad_file_name": no such file or directory} {couldn't open "_bad_file_name": no such file or directory
  145.     while executing
  146. "open _bad_file_name r"
  147.     invoked from within
  148. "tproc2"} none
  149. ---- proc-7.13 FAILED
  150.  
  151.  
  152. ==== proc-7.14 return with special completion code
  153. ==== Contents of test case:
  154.  
  155.     proc tproc2 {} {
  156.     global errorCode errorInfo
  157.     catch {open _bad_file_name r} msg
  158.     return -code error $msg
  159.     }
  160.     string tolower [list [catch tproc2 msg] $msg $errorInfo $errorCode]
  161.  
  162. ==== Result was:
  163. 1 {couldn't open "_bad_file_name": the file or directory specified cannot be found.} {couldn't open "_bad_file_name": the file or directory specified cannot be found.
  164.     while executing
  165. "tproc2"} none
  166. ---- Result should have been:
  167. 1 {couldn't open "_bad_file_name": no such file or directory} {couldn't open "_bad_file_name": no such file or directory
  168.     while executing
  169. "tproc2"} none
  170. ---- proc-7.14 FAILED
  171. regexp.test
  172. rename.test
  173. scan.test
  174. set.test
  175. source.test
  176.  
  177.  
  178. ==== source-1.1 source command
  179. ==== Contents of test case:
  180.  
  181.     set x "old x value"
  182.     set y "old y value"
  183.     set z "old z value"
  184.     exec cat << {
  185.     set x 22
  186.     set y 33
  187.     set z 44
  188.     } > source.file
  189.     source source.file
  190.     list $x $y $z
  191.  
  192. ==== Test generated error:
  193. exec not supported under os/2
  194.  
  195.  
  196. ==== source-1.2 source command
  197. ==== Contents of test case:
  198.  
  199.     exec cat << {list result} > source.file
  200.     source source.file
  201.  
  202. ==== Test generated error:
  203. exec not supported under os/2
  204.  
  205.  
  206. ==== source-2.3 source error conditions
  207. ==== Contents of test case:
  208.  
  209.     exec cat << {
  210.     set x 146
  211.     error "error in sourced file"
  212.     set y $x
  213.     } > source.file
  214.     list [catch {source source.file} msg] $msg $errorInfo
  215.  
  216. ==== Test generated error:
  217. exec not supported under os/2
  218.  
  219.  
  220. ==== source-2.4 source error conditions
  221. ==== Contents of test case:
  222.  
  223.     exec cat << {break} > source.file
  224.     catch {source source.file}
  225.  
  226. ==== Test generated error:
  227. exec not supported under os/2
  228.  
  229.  
  230. ==== source-2.5 source error conditions
  231. ==== Contents of test case:
  232.  
  233.     exec cat << {continue} > source.file
  234.     catch {source source.file}
  235.  
  236. ==== Test generated error:
  237. exec not supported under os/2
  238.  
  239.  
  240. ==== source-2.6 source error conditions
  241. ==== Contents of test case:
  242.  
  243.     string tolower [list [catch {source _non_existent_} msg] $msg $errorCode]
  244.  
  245. ==== Result was:
  246. 1 {couldn't read file "_non_existent_": the file or directory specified cannot be found.} {posix enoent {the file or directory specified cannot be found.}}
  247. ---- Result should have been:
  248. 1 {couldn't read file "_non_existent_": no such file or directory} {posix enoent {no such file or directory}}
  249. ---- source-2.6 FAILED
  250.  
  251.  
  252. ==== source-3.1 return in middle of source file
  253. ==== Contents of test case:
  254.  
  255.     exec cat << {
  256.     set x new-x
  257.     return allDone
  258.     set y new-y
  259.     } > source.file
  260.     set x old-x
  261.     set y old-y
  262.     set z [source source.file]
  263.     list $x $y $z
  264.  
  265. ==== Test generated error:
  266. exec not supported under os/2
  267. split.test
  268. string.test
  269. switch.test
  270. trace.test
  271. unknown.test
  272. uplevel.test
  273. upvar.test
  274. while.test
  275.