Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch py-b8f575aa23-errorinfo Through [1a225bd50e] Excluding Merge-Ins
This is equivalent to a diff from 080b9a1c81 to 1a225bd50e
|
2023-02-02
| ||
| 22:51 | Fix for [b8f575aa2398b0e4] and [154ed7ce564a7b4c], double-[read]/[gets] problem. Partial-read funct... check-in: 11c7f071cb user: pooryorick tags: py-b8f575aa23-nopartial | |
|
2023-01-17
| ||
| 20:09 | Fix for [b8f575aa2398b0e4], and also for [154ed7ce56], Tcl 9: [gets] on -strictencoding 1 configured... Closed-Leaf check-in: 4cdf4836aa user: pooryorick tags: py-b8f575aa23-errorinfo | |
| 15:34 | Fix [read] error behaviour under issue [b8f575aa2398b0e4] by always returning returning successfully... check-in: 1a225bd50e user: pooryorick tags: py-b8f575aa23-errorinfo | |
|
2023-01-08
| ||
| 10:07 | For [read] and [gets] encoding errors, use "-result read" in return options dictionary instead of j... Closed-Leaf check-in: 080b9a1c81 user: pooryorick tags: py-b8f575aa23 | |
|
2023-01-02
| ||
| 23:12 | Merge py-b8f575aa23: Fix for [154ed7ce56], Tcl 9: [gets] on -strictencoding 1 configured channel. check-in: 8c5d9bcc6e user: pooryorick tags: py-b8f575aa23 | |
Changes to generic/tclIOCmd.c.
| ︙ | |||
383 384 385 386 387 388 389 | 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 | + - + |
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Channel chan; /* The channel to read from. */
int newline, i; /* Discard newline at end? */
int toRead; /* How many bytes to read? */
int charactersRead; /* How many characters were read? */
int mode; /* Mode in which channel is opened. */
int exitstatus = TCL_OK;
|
| ︙ | |||
467 468 469 470 471 472 473 | 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 | - - - - + + + + + + + - - - - - - - - - - + - - - - - + + + + - - + | /* * TIP #219. * Capture error messages put by the driver into the bypass area and * put them into the regular interpreter result. Fall back to the * regular message if nothing was found in the bypass. */ |
| ︙ |
Changes to tests/io.test.
| ︙ | |||
1546 1547 1548 1549 1550 1551 1552 | 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 | - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + |
set in [read $f]
close $f
scan [string index $in end] %c
} 160
apply [list {} {
|
| ︙ | |||
9076 9077 9078 9079 9080 9081 9082 | 9076 9077 9078 9079 9080 9081 9082 9083 9084 9085 9086 9087 9088 9089 9090 9091 9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 | - + - - + - + - + - - + - + |
fconfigure $f -encoding binary
# \x81 is invalid in utf-8
puts -nonewline $f A\x81
flush $f
seek $f 0
fconfigure $f -encoding utf-8 -buffering none -eofchar "" -translation lf -strictencoding 1
} -body {
|
| ︙ | |||
9194 9195 9196 9197 9198 9199 9200 | 9192 9193 9194 9195 9196 9197 9198 9199 9200 9201 9202 9203 9204 9205 9206 9207 9208 9209 9210 9211 9212 9213 9214 9215 9216 9217 9218 9219 9220 9221 9222 9223 9224 9225 9226 9227 9228 9229 9230 9231 9232 9233 9234 9235 9236 9237 9238 9239 9240 9241 9242 9243 9244 9245 9246 9247 9248 9249 9250 9251 9252 9253 9254 9255 9256 9257 9258 9259 9260 9261 9262 9263 9264 9265 9266 9267 9268 9269 9270 9271 9272 9273 | - + - + - - - - + + + - + - + - + - + - - + - + - + - - - + + - - + + |
binary scan $d H* hd
set hd
} -cleanup {
removeFile io-75.10
} -result 41c0
|
| ︙ | |||
9291 9292 9293 9294 9295 9296 9297 | 9286 9287 9288 9289 9290 9291 9292 9293 9294 9295 9296 9297 9298 9299 9300 9301 9302 9303 9304 9305 9306 9307 | - + - - + - + |
fconfigure $f -encoding binary
# \x81 is invalid in utf-8
puts -nonewline $f "A\x81"
flush $f
seek $f 0
fconfigure $f -encoding utf-8 -buffering none -eofchar "" -translation lf -strictencoding 1
} -body {
|
| ︙ |
Changes to tests/ioCmd.test.
| ︙ | |||
860 861 862 863 864 865 866 | 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 | + - - + + + + |
} finalize {} watch {} read {
catch {close $chan}
return a
}
}
set ch [chan create read foo]
} -body {
set status [catch {
|
| ︙ | |||
1054 1055 1056 1057 1058 1059 1060 | 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 | - + - + + + - + - + + + - + - + + + - + - + + + - + - + + + - + - + + + + - + |
note [read $c 10]
close $c
rename foo {}
set res
} -result {{read rc* 4096} {read rc* 4096} snarfsnarf}
test iocmd-23.2 {chan read, bad data return, to much} -match glob -body {
set res {}
|
| ︙ |
Changes to tests/ioTrans.test.
| ︙ | |||
446 447 448 449 450 451 452 | 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 | - + + - + - + + - + - + + - + - + + - + - + + |
proc foo {args} {
handle.initialize
handle.finalize
lappend ::res $args
return -code error BOOM!
}
set c [chan push [tempchan] foo]
|
| ︙ |
Changes to tests/zlib.test.
| ︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | + |
testConstraint recentZlib 0
catch {
# Work around a bug in some versions of zlib; known to manifest on at
# least Mac OS X Mountain Lion...
testConstraint recentZlib \
[package vsatisfies [zlib::pkgconfig get zlibVersion] 1.2.6]
}
interp bgerror {} [list [namespace current]::bgerror]
test zlib-1.1 {zlib basics} -constraints zlib -returnCodes error -body {
zlib
} -result {wrong # args: should be "zlib command arg ?...?"}
test zlib-1.2 {zlib basics} -constraints zlib -returnCodes error -body {
zlib ? {}
} -result {bad command "?": must be adler32, compress, crc32, decompress, deflate, gunzip, gzip, inflate, push, or stream}
|
| ︙ | |||
697 698 699 700 701 702 703 | 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 | - + |
close $s
set ::total
} -cleanup {
unset -nocomplain total
close $srv
} -result {eof 500}
test zlib-9.9 "bug #2818131 (gzip mismatch)" -constraints zlib -setup {
|
| ︙ | |||
728 729 730 731 732 733 734 | 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 | - + - + |
close $s
}
set ::total
} -cleanup {
unset -nocomplain total
close $srv
rename bgerror {}
|
| ︙ | |||
761 762 763 764 765 766 767 | 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 | - + - + |
close $s
}
set ::total
} -cleanup {
unset -nocomplain total
close $srv
rename bgerror {}
|
| ︙ | |||
794 795 796 797 798 799 800 | 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 | - + - + |
close $s
}
set ::total
} -cleanup {
unset -nocomplain total
close $srv
rename bgerror {}
|
| ︙ | |||
840 841 842 843 844 845 846 | 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 | - + |
close $srv
rename bgerror {}
} -returnCodes error \
-result {bad event name "xyzzy": must be readable or writable}
test zlib-10.1 "bug #2818131 (mismatch read)" -constraints {
zlib
} -setup {
|
| ︙ | |||
874 875 876 877 878 879 880 | 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 | - + - + |
after cancel {set ::total timeout}
after cancel {set ::total done}
set ::total
} -cleanup {
close $srv
rename bgerror {}
rename zlibRead {}
|
| ︙ |