Menu

#2246 -output doesn't work

obsolete: 8.4.2
closed-fixed
9
2003-07-18
2003-03-19
No

The following test fails:

package require tcltest
proc doit {} {puts "foo"}
namespace eval test {
tcltest::test tcltest-puts-1.0 {-output doesn't work} -
body doit -output "foo\n"
}

This follows the instructions which recommend to put
all tests into a namespace. If the namespace is left
out, it works.

Discussion

  • Don Porter

    Don Porter - 2003-03-19

    Logged In: YES
    user_id=80530

    proc doit should also be in the test namespace.

     
  • Sebastian Wangnick

    Logged In: YES
    user_id=202812

    But proc doit is the procedure I'd like to test!

    In my real environment I have a package that produces
    some output via puts, and it's this output I'd like to test
    against.

     
  • Don Porter

    Don Porter - 2003-04-14
    • priority: 5 --> 9
     
  • Don Porter

    Don Porter - 2003-07-18

    Logged In: YES
    user_id=80530

    Fixed for tcltest 2.2.4 (distributed with Tcl 8.4.4)

     
  • Don Porter

    Don Porter - 2003-07-18
    • status: open --> closed-fixed