Skip to content
Tcl Source Code History Of Ticket 2f9df4c4fa
Login

History Of Ticket 2f9df4c4fa

Artifacts Associated With Ticket 2f9df4c4fa

  1. Ticket change [f184ba45e4] (rid 138471) by anonymous on 2014-06-19 03:32:09:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      I've been trying to create a customMatch in tcltest that allows me to specify the output results via the -output switch that uses data generated by the -body portion of the test.
      
      So, the -output switch in such a scenario would look something like:
      
      -output {$myVariableDefinedIntheBodySection}
      
      and the customMatch is equally straightforward with:
      
      tcltest::customMatch exactSubst exactSubst
      proc exactSubst { expected actual } {
        set expectedSubst "subst {$expected}"
        set expectedSubst [uplevel 1 $expectedSubst]
        return [tcltest::CompareStrings $actual $expectedSubst exact]
      }
      
      so, I just make the customMatch perform the required variable substitution in the -output value.
      
      To use it I use -match exactSubst as expected.
      
      All is well *except* in the -cleanup section of test, I naturally unset the variable myVariableDefinedIntheBodySection.  The odd thing is that tclTest::test runs the -cleanup script *before* it performs the -output, -errorOutput comparisons.  This, of course, thwarts my attempt to use the variable in the -output switch.
      
      This example is a little contrived and in my real case I really want to delete the variable so it doesn't pollute the next test which uses the same variable (in a slightly different way).
      
      So, the request is to move the execution of -cleanup until after the output, errorOutput and result comparisons in tcltest::test.  It's a bit odd that it's in its current location in the code so that makes me think that it's intentional.  So I'm curious to know if it can be done safely.
      
      Regardless, love tcltest and been using it for years.  Thank you for your efforts.  :-)
      
      best regards,
      
      Mark
      
    5. foundin initialized to: "2.3.6"
    6. is_private initialized to: "0"
    7. login: "anonymous"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "d4456006aa793a9b5e98c8665afe28d8d71968fe"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "anonymous"
    14. subsystem initialized to: "34. tcltest Package"
    15. title initialized to:
      tcltest - request to move -cleanup script execution until after -output compare
      
    16. type initialized to: "Support"
  2. Ticket change [9aac871873] (rid 138496) by jan.nijtmans on 2014-06-20 20:25:28:

    1. assignee changed to: "jan.nijtmans"
    2. icomment:
      I think that the -cleanup code should be able to clean up everything, even a custom match function. It appears that no test results are affected, so this should be harmless. Is your suggestion this: [a61197b82c]?.
      
      Thanks!
      
    3. login: "jan.nijtmans"
    4. mimetype: "text/x-fossil-wiki"
    5. type changed to: "Bug"
  3. Ticket change [0a72a31a1a] (rid 138499) by anonymous on 2014-06-22 01:56:27:

    1. icomment:
      Looks good.  I think the ability to build expectedValue output and errorOutput from test body material is a great addition to tcltest's capability.  Thank you!
      
    2. login: "anonymous"
    3. mimetype: "text/html"
    4. username: "anonymous"
  4. Ticket change [af6856ecb5] (rid 138505) by jan.nijtmans on 2014-06-22 16:28:55:

    1. closedate changed to: "2456831.18675876"
    2. closer changed to: "jan.nijtmans"
    3. icomment:
      Committed to core-8-5-branch [1a1cb1c7d723aa20a18f4d6eee8fffe12c9c4291|1a1cb1c7d7] and trunk [6c7cb5d46a2d26e911beae049f96e8e3eef9ae80|6c7cb5d46a]
      
    4. login: "jan.nijtmans"
    5. mimetype: "text/x-fossil-wiki"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
  5. Ticket change [784e966029] (rid 138519) by dgp on 2014-06-23 11:55:41:

    1. closedate changed to: "2456831.99700264"
    2. closer changed to: "dgp"
    3. icomment:
      New test failure on trunk:
      
      execute.test
      Test file error: invalid -preservecore value "": expected integer but got ""
          while executing
      "Configure -preservecore"
          (procedure "preserveCore" line 5)
          invoked from within
      "preserveCore"
          (procedure "test" line 1)
          invoked from within
      "test execute-6.5 {TclCompEvalObj: bytecode epoch validation} -body {
          set script { llength {} }
          set result {}
          lappend result [if 1 $script]..."
          (file "/local/tmp/dgp/fossil/tcl-only/tests/execute.test" line 607)
      
    4. login: "dgp"
    5. mimetype: "text/plain"
  6. Ticket change [bfc6957273] (rid 138520) by jan.nijtmans on 2014-06-23 12:40:08:

    1. closedate changed to: "2456832.02787801"
    2. closer changed to: "jan.nijtmans"
    3. icomment:
      Yes, I can reproduce this on trunk, but on on core-8-5-branch. Investigation mode on.....
      
    4. login: "jan.nijtmans"
    5. mimetype: "text/plain"
  7. Ticket change [3cb1e21ad0] (rid 138524) by jan.nijtmans on 2014-06-23 12:50:02:

    1. closedate changed to: "2456832.03474706"
    2. icomment: "Fixed on core-8-5-branch and trunk now. Thanks!"
    3. login: "jan.nijtmans"
    4. mimetype: "text/plain"