Tcl Source Code

Hex Artifact Content
Login

Artifact ca03bb0bbe2ee40a6b065d5c1cf864764f413210:

Attachment "trace.patch.2" to ticket [1773040fff] added by mpc_janssen 2007-08-14 02:20:54.
0000: 64 69 66 66 20 2d 2d 67 69 74 20 61 2f 74 65 73  diff --git a/tes
0010: 74 73 2f 74 72 61 63 65 2e 74 65 73 74 20 62 2f  ts/trace.test b/
0020: 74 65 73 74 73 2f 74 72 61 63 65 2e 74 65 73 74  tests/trace.test
0030: 0a 69 6e 64 65 78 20 63 32 64 37 62 31 37 2e 2e  .index c2d7b17..
0040: 38 37 39 30 63 32 35 20 31 30 30 36 34 34 0a 2d  8790c25 100644.-
0050: 2d 2d 20 61 2f 74 65 73 74 73 2f 74 72 61 63 65  -- a/tests/trace
0060: 2e 74 65 73 74 0a 2b 2b 2b 20 62 2f 74 65 73 74  .test.+++ b/test
0070: 73 2f 74 72 61 63 65 2e 74 65 73 74 0a 40 40 20  s/trace.test.@@ 
0080: 2d 32 34 36 2c 37 20 2b 32 34 36 2c 31 37 20 40  -246,7 +246,17 @
0090: 40 20 74 65 73 74 20 74 72 61 63 65 2d 32 2e 36  @ test trace-2.6
00a0: 20 7b 74 72 61 63 65 20 76 61 72 69 61 62 6c 65   {trace variable
00b0: 20 77 72 69 74 65 73 20 6f 6e 20 63 6f 6d 70 69   writes on compi
00c0: 6c 65 64 20 6c 6f 63 61 6c 7d 20 7b 0a 20 20 20  led local} {.   
00d0: 20 20 70 0a 20 20 20 20 20 73 65 74 20 69 6e 66    p.     set inf
00e0: 6f 0a 20 7d 20 7b 78 20 58 20 77 72 69 74 65 20  o. } {x X write 
00f0: 30 20 77 69 6c 6c 79 7d 0a 2d 0a 2b 74 65 73 74  0 willy}.-.+test
0100: 20 74 72 61 63 65 2d 32 2e 37 20 7b 74 72 61 63   trace-2.7 {trac
0110: 65 20 76 61 72 69 61 62 6c 65 20 77 72 69 74 65  e variable write
0120: 73 20 6f 6e 20 65 72 72 6f 72 49 6e 66 6f 7d 20  s on errorInfo} 
0130: 2d 62 6f 64 79 20 7b 0a 2b 20 20 20 23 0a 2b 20  -body {.+   #.+ 
0140: 20 20 23 20 43 68 65 63 6b 20 63 6f 72 72 65 63    # Check correc
0150: 74 20 62 65 68 61 76 69 6f 75 72 20 6f 66 20 77  t behaviour of w
0160: 72 69 74 65 20 74 72 61 63 65 73 20 6f 6e 20 65  rite traces on e
0170: 72 72 6f 72 49 6e 66 6f 2e 0a 2b 20 20 20 23 20  rrorInfo..+   # 
0180: 5b 42 75 67 20 31 37 37 33 30 34 30 5d 0a 2b 20  [Bug 1773040].+ 
0190: 20 20 74 72 61 63 65 20 61 64 64 20 76 61 72 69    trace add vari
01a0: 61 62 6c 65 20 3a 3a 65 72 72 6f 72 49 6e 66 6f  able ::errorInfo
01b0: 20 77 72 69 74 65 20 74 72 61 63 65 53 63 61 6c   write traceScal
01c0: 61 72 0a 2b 20 20 20 63 61 74 63 68 20 7b 73 65  ar.+   catch {se
01d0: 74 20 64 6e 65 7d 0a 2b 20 20 20 6c 72 61 6e 67  t dne}.+   lrang
01e0: 65 20 5b 73 65 74 20 69 6e 66 6f 5d 20 30 20 32  e [set info] 0 2
01f0: 0a 2b 7d 20 2d 63 6c 65 61 6e 75 70 20 7b 0a 2b  .+} -cleanup {.+
0200: 20 20 20 23 20 61 6c 77 61 79 73 20 72 65 6d 6f     # always remo
0210: 76 65 20 74 72 61 63 65 20 6f 6e 20 65 72 72 6f  ve trace on erro
0220: 72 49 6e 66 6f 20 6f 74 68 65 72 77 69 73 65 20  rInfo otherwise 
0230: 66 75 72 74 68 65 72 20 74 65 73 74 73 20 77 69  further tests wi
0240: 6c 6c 20 66 61 69 6c 0a 2b 20 20 20 75 6e 73 65  ll fail.+   unse
0250: 74 20 3a 3a 65 72 72 6f 72 49 6e 66 6f 0a 2b 7d  t ::errorInfo.+}
0260: 20 2d 72 65 73 75 6c 74 20 7b 65 72 72 6f 72 49   -result {errorI
0270: 6e 66 6f 20 7b 7d 20 77 72 69 74 65 7d 0a 20 0a  nfo {} write}. .
0280: 20 23 20 61 70 70 65 6e 64 20 6e 6f 20 6c 6f 6e   # append no lon
0290: 67 65 72 20 74 72 69 67 67 65 72 73 20 72 65 61  ger triggers rea
02a0: 64 20 74 72 61 63 65 73 20 77 68 65 6e 20 66 65  d traces when fe
02b0: 74 63 68 69 6e 67 20 74 68 65 20 6f 6c 64 20 76  tching the old v
02c0: 61 6c 75 65 73 20 6f 66 0a 20 23 20 76 61 72 69  alues of. # vari
02d0: 61 62 6c 65 73 20 62 65 66 6f 72 65 20 64 6f 69  ables before doi
02e0: 6e 67 20 74 68 65 20 61 70 70 65 6e 64 20 6f 70  ng the append op
02f0: 65 72 61 74 69 6f 6e 2e 20 48 6f 77 65 76 65 72  eration. However
0300: 2c 20 6c 61 70 70 65 6e 64 20 5f 64 6f 65 73 5f  , lappend _does_
0310: 0a                                               .