GNU bug report logs -
#71493
ignore-case test fails on several platforms
Previous Next
Reported by: Bruno Haible <bruno <at> clisp.org>
Date: Tue, 11 Jun 2024 21:11:01 UTC
Severity: normal
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
In current diffutils (git master), I see a failure
FAIL: ignore-case
on
- CentOS 7,
- macOS 11..14,
- Solaris 11.4 and Solaris 11 OmniOS,
- NetBSD 10.0.
How to reproduce:
$ echo 'AĀȀΆΑАӐḀἈⒶꞺA𐐀-Δ' >a
$ echo 'aāȁάαаӑḁἀⓐꞻa𐐨-δ' >b
$ LC_ALL=en_US.UTF-8 ../src/diff -i a b
1c1
< AĀȀΆΑАӐḀἈⒶꞺA𐐀-Δ
---
> aāȁάαаӑḁἀⓐꞻa𐐨-δ
On CentOS 7, when I set a breakpoint at 'hash', I see the following
char32_t values appear in order:
97 257 513 940 945 1072 1233 7681 7936 9424 42938 65345 66600 45 948
97 257 513 940 945 1072 1233 7681 7936 9424 42939 65345 66600 45 948
So, the c32tolower invocation that does not behave as expected is
the 11th character. Removing the 11th character fixes the test failure on
- CentOS 7,
- macOS 12,
- Solaris 11 OmniOS.
The same procedure on Solaris 11.4 produces the following char32_t values:
97 257 513 940 945 1072 1233 7681 7936 9398 42938 65345 66600 45 948
97 257 513 940 945 1072 1233 7681 7936 9424 42939 65345 66600 45 948
So, here it's the 10th character that causes the comparison to fail.
The same procedure on NetBSD 11.0 produces the following char32_t values:
97 257 513 940 945 1072 1233 7681 7936 9398 42939 65345 66600 45 948
97 257 513 940 945 1072 1233 7681 7936 9424 42939 65345 66600 45 948
So, here it's the 10th character as well that causes the comparison to fail.
In summary, the attached patch fixes the test failure on all platforms.
It acknowledges that there is some variation between platforms, when it
comes to upper-/lowercase mappings.
Bruno
[0001-tests-Fix-ignore-case-failure-on-several-platforms.patch (text/x-patch, attachment)]
This bug report was last modified 345 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.