Skip to content
Tcl Source Code History Of Ticket 541637ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 541637ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 541637ffffffffffffffffffffffffffffffffff

  1. Ticket change [abe1cf68ac] (rid 101195) by kenstir on 2002-04-09 17:25:41:

    1. assignee initialized to: "melissachawla"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      If you run the attached foo.test, you'll get an error
      (against CVS HEAD as of today).  There are three things
      wrong and I could only figure out how to fix two:
      
      1) [outputChannel] doesn't work from within
      tcltest::replace namespace.  Fixed by specifying
      complete namespace.
      
      2) We don't want to append the output to outData twice.
       Fixed by calling return after figuring out we could
      handle the puts.
      
      3) The test now runs but still doesn't pass.  Somehow
      the [concat] inside tcltest::test is stripping the
      newline from the -output option.  I don't understand
      why the concat is done so I'm not sure the best way to
      fix it.
      
      Hopefully this 2/3 patch is useful.
      
      Regards, a tcltest fan,
      Ken
      
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "kenstir"
    9. subsystem initialized to: "34. tcltest Package"
    10. title initialized to: "{puts stdout $msg} fails inside test"
    11. type initialized to: "Patch"
  2. Ticket change [2825ba90bf] (rid 88646) by kenstir on 2002-04-10 00:25:41:

    1. icomment:
      
      
      File Added - 20867: foo.test
      
      
      
    2. login: "kenstir"
    3. mimetype: "text/plain"
    4. username: "kenstir"
  3. Add attachment "foo.test" [a9d30f9921] (rid 99223) by kenstir on 2002-04-10 00:25:41.

  4. Ticket change [f818dfd275] (rid 91481) by kenstir on 2002-04-10 00:26:17:

    1. icomment:
      
      
      File Added - 20868: foo.patch
      
      
      
    2. login: "kenstir"
    3. mimetype: "text/plain"
    4. username: "kenstir"
  5. Add attachment "foo.patch" [cd256cc62b] (rid 95833) by kenstir on 2002-04-10 00:26:17.

  6. Ticket change [b06d6c1182] (rid 97977) by dgp on 2002-04-11 08:10:34:

    1. assignee changed to: "dgp"
  7. Ticket change [2fab412995] (rid 93100) by dgp on 2002-04-19 04:39:02:

    1. priority changed to: "6"
  8. Ticket change [009059f668] (rid 119343) by dgp on 2002-06-26 07:41:03:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      I believe the first 2 issues are corrected in tcltest 2.1.
      please test again.
      
      I'm looking into 3 now...
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  9. Ticket change [0df67f45cb] (rid 94524) by dgp on 2002-06-26 08:11:36:

    1. closedate changed to: "2002-06-26T01:11:36"
    2. closer changed to: "dgp"
    3. icomment:
      Logged In: YES 
      user_id=80530
      
      
      uggghhhh.  Issue 3 has to do with how to interpret the second
      form of the tcltest::test command.  tcltest::test recognizes two
      documented syntaxes:
      
          test $name $description ?$opt $val ...?
      
      and
      
          test $name $description $singleArgumentToBeParsed
      
      Supposedly the second form is helpful because it lets one
      enclose everything in braces and avoid a lot of backslash
      quoting
      of newlines.  Trouble is that the rules for parsing that single
      argument (what substitutions are done?  in what context?) are
      never documented clearly, and the code that implements that
      parsing is a maze of obfuscation.  I think the code is probably
      wrong, but I think it's wrong to even offer the second syntax.
      Tcl has simple quoting rules; why muck up this command with
      its own undocumented special parsing syntax.
      
      The backslash newline issues can be just about completely
      addressed by a coding convention that places the newlines
      within arguments that are brace-quoted anyway.  See
      main.test for an example.
      
      But, I'm not going to change that now.  Whatever voodoo is
      in there, there must be some test suite somewhere that's
      using it, so I don't dare change it.  Indeed when I disabled
      the [concat] voodoo, tests in the Tcl test suite indeed did 
      begin to fail.
      
      Instead, I just recommend that you do not use the second
      syntax in your own test suites.  It is documented that
      the two forms can behave differently.  From my perspective,
      the first form is predictable (if you know Tcl substitution
      rules);
      the second form is not.  As you've discovered, the second
      form can cause the dropping of trailing whitespace that can
      be important.
      
      Rewrite your foo.test as:
      
        test CLR-1.1 {...} -body {
          puts stdout here...
        } -result {} -output "here\n"
      
      and go forward and prosper.
      
      
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. resolution changed to: "Wont Fix"
    7. status changed to: "Closed"
    8. username: "dgp"
  10. Ticket change [ecdb3685de] (rid 103779) by kenstir on 2002-06-26 11:05:56:

    1. closedate changed to: "2002-06-26T04:05:56"
    2. closer changed to: "kenstir"
    3. icomment:
      Logged In: YES 
      user_id=246646
      
      Yes, the other issues are fixed in the cvs HEAD.
      
      And thank you for your advice on issue 3.  I will heed it,
      go forward, and prosper, using the simpler first syntax.  I
      was drawn astray by the siren song of the braced syntax.  It
      looked so expect-like and friendly, I should have known it
      was a trap.
      
      Thanks and regards,
      Ken Cox
      
      
      
    4. login: "kenstir"
    5. mimetype: "text/plain"
    6. username: "kenstir"