Artifact
99d669388e668cd4da281782a96fa165895feeb6:
- File
test/th1-tcl7.txt
— part of check-in
[53b9445b2c]
at
2011-08-28 23:45:18
on branch tcl-integration
— Use macros to tidy up TH1 to Tcl argument marshalling. Use the Tcl interp result when Tcl_ExprObj does not return ok. Check for Tcl interp deletion. The TH1 'puts' command should flush when writing to stdout. Add 'repository' TH1 command. Use obj API to get Tcl cmdInfo. Add tests for Tcl integration.
(user:
mistachkin
size: 500)
[more...]
0000: 3c 74 68 31 3e 0a 20 20 23 0a 20 20 23 20 54 68 <th1>. #. # Th
0010: 69 73 20 69 73 20 61 20 22 54 48 31 20 66 72 61 is is a "TH1 fra
0020: 67 6d 65 6e 74 22 20 75 73 65 64 20 74 6f 20 74 gment" used to t
0030: 65 73 74 20 74 68 65 20 54 63 6c 20 69 6e 74 65 est the Tcl inte
0040: 67 72 61 74 69 6f 6e 20 66 65 61 74 75 72 65 73 gration features
0050: 20 6f 66 20 54 48 31 2e 0a 20 20 23 20 54 68 65 of TH1.. # The
0060: 20 63 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20 74 corresponding t
0070: 65 73 74 20 66 69 6c 65 20 65 78 65 63 75 74 65 est file execute
0080: 73 20 74 68 69 73 20 66 69 6c 65 20 75 73 69 6e s this file usin
0090: 67 20 74 68 65 20 74 65 73 74 2d 74 68 2d 72 65 g the test-th-re
00a0: 6e 64 65 72 0a 20 20 23 20 46 6f 73 73 69 6c 20 nder. # Fossil
00b0: 63 6f 6d 6d 61 6e 64 2e 0a 20 20 23 0a 20 20 70 command.. #. p
00c0: 72 6f 63 20 64 6f 4f 75 74 20 7b 6d 73 67 7d 20 roc doOut {msg}
00d0: 7b 70 75 74 73 20 24 6d 73 67 3b 20 70 75 74 73 {puts $msg; puts
00e0: 20 5c 6e 7d 0a 0a 20 20 23 0a 20 20 23 20 42 55 \n}.. #. # BU
00f0: 47 42 55 47 3a 20 41 74 74 65 6d 70 74 69 6e 67 GBUG: Attempting
0100: 20 74 6f 20 64 69 76 69 64 65 20 62 79 20 7a 65 to divide by ze
0110: 72 6f 20 77 69 6c 6c 20 63 72 61 73 68 20 54 48 ro will crash TH
0120: 31 20 77 69 74 68 20 74 68 65 20 65 72 72 6f 72 1 with the error
0130: 3a 0a 20 20 23 20 20 20 20 20 20 20 20 20 22 63 :. # "c
0140: 68 69 6c 64 20 6b 69 6c 6c 65 64 3a 20 66 6c 6f hild killed: flo
0150: 61 74 69 6e 67 2d 70 6f 69 6e 74 20 65 78 63 65 ating-point exce
0160: 70 74 69 6f 6e 22 0a 20 20 23 0a 20 20 23 20 64 ption". #. # d
0170: 6f 4f 75 74 20 5b 74 63 6c 45 76 61 6c 20 74 68 oOut [tclEval th
0180: 31 45 78 70 72 20 32 2f 30 5d 0a 0a 20 20 23 0a 1Expr 2/0].. #.
0190: 20 20 23 20 4e 4f 54 45 3a 20 46 6f 72 20 6e 6f # NOTE: For no
01a0: 77 2c 20 6a 75 73 74 20 63 61 75 73 65 20 61 6e w, just cause an
01b0: 20 65 78 70 72 65 73 73 69 6f 6e 20 73 79 6e 74 expression synt
01c0: 61 78 20 65 72 72 6f 72 2e 0a 20 20 23 0a 20 20 ax error.. #.
01d0: 64 6f 4f 75 74 20 5b 74 63 6c 45 76 61 6c 20 74 doOut [tclEval t
01e0: 68 31 45 78 70 72 20 32 2a 2a 30 5d 0a 3c 2f 74 h1Expr 2**0].</t
01f0: 68 31 3e 0a h1>.