summaryrefslogtreecommitdiffstats
path: root/tests/utf.test
Commit message (Collapse)AuthorAgeFilesLines
* Merge 8.5jan.nijtmans2021-04-121-75/+75
|\
| * Backport utf testcase tweaks from 8.7. No change for ucs-2jan.nijtmans2021-04-121-75/+75
| |
| * Backport Tcl_UtfCharComplete() functionality from 8.6 for TCL_UTF_MAX>3. ↵jan.nijtmans2021-03-111-3/+3
| | | | | | | | This makes Tcl_UtfCharComplete() usable to protect Tcl_UtfNext() calls for overflow. No change for TCL_UTF_MAX=3 (default build)
* | Fix [4c591fa487]: [string compare] EIAS violationjan.nijtmans2021-03-101-19/+1
| |
* | Merge 8.5. Just split some testcasesjan.nijtmans2021-03-031-5/+10
|\ \ | |/
| * Backport improvements in UTF-8 handling for Tcl_UtfPrev/Tcl_UtfNext from 8.7 ↵jan.nijtmans2021-03-031-28/+64
| | | | | | | | (through 8.6). No change for TCL_UTF_MAX=3. Adapt test-cases accordingly
| * Backport 3 additional test-cases from 8.6 for TCL_UTF_MAX>3jan.nijtmans2021-02-171-7/+16
| |
| * Enhance misleading test-case utf-6.23 with better diagnostics: Byte 0xE8 is ↵jan.nijtmans2020-11-181-6/+6
| | | | | | | | the start of a 3-byte UTF-8 sequence, so Tcl_UtfNext is expected to read next byte and see if it is a continuation byte
| * Testcase cleanup: Sync with testcases in core-8-6-branchjan.nijtmans2020-05-131-75/+54
| |
* | Backport some UTF-8-related changed from 8.7 to 8.6, only for TCL_UTF_MAX > ↵jan.nijtmans2021-03-021-14/+51
| | | | | | | | | | 3. No change for TCL_UTF_MAX=3. Also adapt test-cases accordingly, and add comments why the changes were done.
* | Fix Tcl_UtfPrev expected testcases for TCL_UTF_MAX>3jan.nijtmans2021-02-161-8/+17
| |
* | Suppress testing of known bug only when it is present. Allow tests that pass.dgp2020-12-261-1/+19
| |
* | Fix 2 testcases which failed when compiled with TCL_UTF_MAX>3jan.nijtmans2020-11-161-4/+4
| |
* | Enhance misleading test-case utf-6.23 with better diagnostics: Byte 0xE8 is ↵jan.nijtmans2020-11-161-2/+6
| | | | | | | | | | | | the start of a 3-byte UTF-8 sequence, so Tcl_UtfNext is expected to read next byte and see if it is a continuation byte. Comment 4 testcases (utf-6.110/111/114/115) for being misleading too, because they don't even call Tcl_UtfNext(). No change to code, only testcases
* | Let all test-cases load the "tcltest" package the same way. Depend on ↵jan.nijtmans2020-09-041-2/+2
| | | | | | | | tcltest 2.5, since we never test with earlier tcltest versions
* | Fix utf-1.13 testcase for TCL_UTF_MAX>3jan.nijtmans2020-07-101-1/+1
| |
* | Addendum to [60fab362ce]: "Also don't allow surrogates in \U??????". This ↵jan.nijtmans2020-07-101-2/+2
| | | | | | | | change was only meant for builds with TCL_UTF_MAX > 3.
* | Tiny fix for TCL_UTF_MAX=4 build only: Since Tcl_UtfNext() verifies 4 bytes ↵jan.nijtmans2020-05-181-9/+3
| | | | | | | | for lead bytes F0-F5, Tcl_UtfCharComplete() should guarantee that those 4 bytes are available, not 3.
* | Fix [ed29806baf]: Tcl_UtfToUniChar reads more than TCL_UTF_MAX bytesjan.nijtmans2020-05-131-134/+77
|\ \
| * \ Merge testcase cleanup. Make Tcl_UtfPrev() behave the same for any ↵jan.nijtmans2020-05-121-19/+18
| |\ \ | |/ / |/| | | | | TCL_UTF_MAX value, since we didn't figure out yet how it should behave for TCL_UTF_MAX>3.
| * | Fix "knownBug" utf-4.11. Turns out a few other testcases where still not ↵jan.nijtmans2020-05-121-174/+54
| | | | | | | | | | | | correct, now they are. Make next/prev behavior the same for all TCL_UTF_MAX values, since the exact behavior for TCL_UTF_MAX>3 should be worked out further for Tcl 8.7 first, then everything agreed upon can be backported.
| * | Merge 8.6. Mark testcase utf-4.11 as "knownBug": this one still doesn't give ↵jan.nijtmans2020-05-111-100/+112
| |\ \ | | | | | | | | | | | | the right answer. Add testcase 4.14 with similar corner-case, this one is OK.
| * | | Change order of some testcases, matching 8.6jan.nijtmans2020-05-071-12/+12
| | | |
* | | | Merge 8.5jan.nijtmans2020-05-121-66/+59
|\ \ \ \ | |_|/ / |/| | / | | |/ | |/|
| * | Unsplit some test-cases and renumber, for testcase which give the same ↵jan.nijtmans2020-05-121-100/+46
| | | | | | | | | | | | results for different TCL_UTF_MAX values.
* | | Tweak the Tcl_UtfPrev() implementation for TCL_UTF_MAX=4. This fixes 10 ↵jan.nijtmans2020-05-111-34/+28
| | | | | | | | | | | | testcases in 4 groups (utf-7.10, utf-7.15, utf-7.40 and utf-7.48) , where Tcl_UtfPrev() didn't jump to the beginning of the UTF-8 character, even though there was no limitation which prevented that. So, this is actually a bug-fix for the TIP #389 implementation.
* | | occurance -> occurrence.jan.nijtmans2020-05-111-1/+1
| | |
* | | Tweak Invalid() function: No need for "return 0" twice in the function. jan.nijtmans2020-05-101-7/+7
| | | | | | | | | For start bytes F0-F4, case TCL_UTF_MAX=4, Tcl_UtfToUniChar() reads 3 bytes but only advances 1 byte. So Tcl_UtfCharComplete() must make sure 3 bytes are available, not 1. Adapt Tcl_UtfCharComplete() accordingly. No change for TCL_UTF_MAX=[3|6]
* | | Rebase to latest core-8-6-branch.jan.nijtmans2020-05-081-12/+3
|\ \ \ | | |/ | |/|
| * | Merge 8.6jan.nijtmans2020-05-071-21/+33
| |\ \
| * \ \ merge 8.6dgp2020-05-071-2/+8
| |\ \ \
| * \ \ \ Merge 8.6. Some more tweaks to Tcl_UtfPrev(), so it cannot jump back 4 bytes ↵jan.nijtmans2020-05-071-543/+515
| |\ \ \ \ | | | | | | | | | | | | | | | | | | in "utf16" build any more.
| * | | | | Add 4 test-cases that could fool Tcl_UtfPrev (but ... actually they don't).jan.nijtmans2020-05-051-0/+12
| | | | | | | | | | | | | | | | | | Make sure that Tcl_UtfPrev() never reads more than 3 trail bytes (or 4 when TCL_UTF_MAX > 4). Those are the same limits as for Tcl_UtfNext() and Tcl_UtfToUniChar()
| * | | | | Merge 8.6jan.nijtmans2020-05-051-23/+23
| |\ \ \ \ \
| * | | | | | More progress/simplificationjan.nijtmans2020-05-041-21/+12
| | | | | | |
| * | | | | | Merge 8.6jan.nijtmans2020-05-041-7/+7
| |\ \ \ \ \ \
| * \ \ \ \ \ \ Merge 8.6jan.nijtmans2020-05-041-27/+35
| |\ \ \ \ \ \ \
| * | | | | | | | Seems almost correct. Still problem with "string index" for TCL_UTF_MAX>3jan.nijtmans2020-05-021-59/+56
| | | | | | | | |
| * | | | | | | | More fixes for [ed29806baf]. Not working yet. WIPjan.nijtmans2020-05-021-22/+23
| | | | | | | | |
* | | | | | | | | Merge 8.5jan.nijtmans2020-05-081-5/+23
|\ \ \ \ \ \ \ \ \ | | |_|_|_|_|_|_|/ | |/| | | | | | |
| * | | | | | | | More test-case cleanup. Enhance "testutfnext", so it can detect whether ↵jan.nijtmans2020-05-081-87/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bytes after the string-end are read. The command will return -1 in that case. No need for additional arguments any more.
* | | | | | | | | More testcases that can run without "testbytestring" constraints.jan.nijtmans2020-05-081-36/+36
| |_|_|_|_|_|_|/ |/| | | | | | |
* | | | | | | | close forkdgp2020-05-071-5/+5
|\ \ \ \ \ \ \ \
| * \ \ \ \ \ \ \ Merge 8.5jan.nijtmans2020-05-071-20/+20
| |\ \ \ \ \ \ \ \
* | \ \ \ \ \ \ \ \ merge 8.5dgp2020-05-071-17/+26
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / |/| | / / / / / / / | | |/ / / / / / / | |/| | | | | | |
| * | | | | | | | close forkdgp2020-05-071-16/+16
| |\ \ \ \ \ \ \ \ | | |/ / / / / / /
| | * | | | | | | Simplify test-cases which don't need the "testbytestring" command to run ↵jan.nijtmans2020-05-071-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | without it. e.g. [testbytestring \xC2\xA2] is the same as just \xA2.
| * | | | | | | | Same trouble with Tcl_UtfToUniCharDstring. Test and fix.dgp2020-05-071-1/+10
| |/ / / / / / /
* | | | | | | | merge 8.5dgp2020-05-071-0/+3
|\ \ \ \ \ \ \ \ | |/ / / / / / / | | | | | | | / | |_|_|_|_|_|/ |/| | | | | |
| * | | | | | Test demonstrating bug in ticket [b2816a3afe].dgp2020-05-071-0/+3
| | | | | | |