Skip to content
Tcl Source Code View Ticket
Login

View Ticket

test failures in reg.test

Closed / Fixedb8a30af3da942f8f8c513aa981906e64e5425249Created 3 years agoUpdated 3 years ago
Descriptionplain2023-11-22 16:25:27
==== reg-13.33.execute RE engine escapes (execute) FAILED
==== Contents of test case:
list [testregexp -xflags P {a\U100000x} a􀀀x match]  $match
---- Result was:
1 a\U00100000x
---- Result should have been (exact matching):
1 a\U00100000
==== reg-13.33.execute FAILED



==== reg-13.34.execute RE engine escapes (execute) FAILED
==== Contents of test case:
list [testregexp -xflags P {a\U100000x} a􀀀x match]  $match
---- Result was:
1 a\U00100000x
---- Result should have been (exact matching):
1 a\U00100000
==== reg-13.34.execute FAILED
Referenced by4
dgpplain2023-11-22 17:04:42
Branch bug-b8a30af3da edits the tests so that they pass for me, but I'll
need another review that the tests are operating properly.
oehharwiki2023-11-22 17:05:57

Yes, really looks like a test error. Great catch ! Harald

jan.nijtmanswiki2023-11-22 22:07:36

The strange thing is: For me the tests pass without the 'x', but - looking at the testcase - the 'x' should be there. Something very strange going on here .....

jan.nijtmanswiki2023-11-23 13:27:05

Magic failure has ben cleared up: Tcl regexp machinery uses UTF-32 everywhere, but in tclTest.c Tcl_GetRange() was used, which indexes in UTF-16 (because tclTest.c tests UTF_MAX=3 compatibility mode as much as possible).

Fully fixed now. In 9.0 it worked, because there UTF-32 is used everywhere.

Log in (anonymous is fine) to add a comment.