[Lazarus] unit Masks vs. unit FPMasks
joshyfun at gmail.com
Wed Feb 24 11:22:09 CET 2021
El 24/02/2021 a las 10:31, Juha Manninen via lazarus escribió:
> José Mejuto's code is a major rewrite for Masks. It supports Unicode in
> masks, too.
> I try to make it compatible by changing some class and method names, and
> then run the unit tests.
In my code there is non 100% unicode compatibility when using the
"CaseInsensitive" mode as as it uses lowercase mask and lowercase string
to perform the test which is wrong by definition but I was unable to
find a method to test codepoints case insensitive without pulling in big
I was thinking in import the NTFS (the filesystem) case comparison
tables which are 128 KB "only".
> Comprehensive unit tests are a way to prevent breaking things.
And also define if a compatibility break is a bug in the new code or in
the old code. In example my mask supports (there is a define to disable)
"[z-a]" converting it to "[a-z]" which is a compatibility break. Also
there is the support (also can be disabled) for the mask "[?]" which is
the counterpart for "*" but with one char position.
> There are no tests for MatchesWindowsMask() yet.
Who defines which are right and which are wrong ? There is no official
DOS/Windows mask strategies, only inherited behaviour since CP/M. Maybe
the behaviour of CMD.EXE ? Which version of CMD.EXE ?
More information about the lazarus