Posted to tcl by tomk at Fri Apr 20 22:22:46 GMT 2018view raw

  1. Here is an example of two tests:
  2.  
  3. 1.0 {
  4. {"proc \{ args \} \{ puts hello"}
  5. {error {unbalanced bracket}}
  6. }
  7. 1.1 {
  8. {puts "hello" "good"bye\"}
  9. {error {extra character after close quote}}
  10. }
  11.  
  12. These are written as:
  13.  
  14. test TEST-1.0 {ERRORS} -constraints {} -setup {
  15. set txt "proc \{ args \} \{ puts hello"
  16. } -body {
  17. ScanInput::Text2Commands $txt C:/Users/tom/PROJECTS/src/kterm/ScanInput/TESTS/DEBUG/dbug_1.0.txt
  18. } -result {error {unbalanced bracket}} -output {} -match exact -cleanup {}
  19.  
  20. test TEST-1.1 {ERRORS} -constraints {} -setup {
  21. set txt {puts "hello" "good"bye\"}
  22. } -body {
  23. ScanInput::Text2Commands $txt C:/Users/tom/PROJECTS/src/kterm/ScanInput/TESTS/DEBUG/dbug_1.1.txt
  24. } -result {error {extra character after close quote}} -output {} -match exact -cleanup {}