[fpc-pascal] TPath enhancements (Issue #40513): can somebody test with Delphi 12?

Bart bartjunk64 at gmail.com
Sat Nov 18 18:23:55 CET 2023


Hi,

I'm trying to implement the new features that were added in Delphi 12 to TPath.
I've made a naive implementation based upon available documentation.
Some questions about how it is supposed to behave are missing though:
1. The docs state that an exception is raised if the given paths
contain invalid characters. Does the vlaue of the ValidateParams have
any influence on this?
2. If not: what does this ValidateParams parameter do then?
3. if multiple paths are absolute (e.g. the 2nd, 3rd and 6th path is
absolute): what will be returned? (My guess: either the first absolute
one it finds, or the last one.)

Could anybody with Delphi 12 test the TPath.Combine(const Paths: array
of string; const ValidateParams: Boolean = True): string; function
with the test program that is in the bugtracker
(https://gitlab.com/freepascal.org/fpc/source/-/issues/40513#note_1645757436)?
Does it behave like the implementation I came up with?
If a parameter is "invalid", but it is not used in the result (e.g.
because there is a valid absolute path as the second or later argument
in the array), will there be an exception?

Without (black box) testing it'll be impossible to implement these features.
-- 
Bart


More information about the fpc-pascal mailing list