Fun program for the day:

Fun program for the day:

{$APPTYPE CONSOLE}

uses
System.SysUtils,
System.IOUtils;

procedure Main;
var
Ch: Char;
begin
for Ch := low(Ch) to high(Ch) do
if TPath.HasValidPathChars(Ch, False)<>TPath.HasValidPathChars(Ch, True) then
Writeln('different at #' + IntToStr(ord(Ch)));
Writeln('finished');
end;

begin
Main;
Readln;
end.

See https://stackoverflow.com/questions/45346525/why-tpath-hasvalidpathchars-accepts-as-valid-char-in-a-path
https://stackoverflow.com/questions/45346525/why-tpath-hasvalidpathchars-accepts-as-valid-char-in-a-path

Comments

  1. David Heffernan I don't have your email address. Can you drop me an email, please - firstname dot lastname at emb?

    ReplyDelete
  2. David Millington When I come across RTL code that very, very obviously has not been tested, the conclusion is that the unit tests are not vast enough. What I ponder is what kind of process actually took place when the code was added. This is a classic example:

    quality.embarcadero.com - Log in - Embarcadero Technologies

    (and related reports) The nature of the issue demonstrates that the code could never have been tested when it was added, simply because it won't work. It's not like it doesn't work in certain scenarios, it just won't work, period.

    ReplyDelete
  3. It's hard to believe that HasValidPathChars has any testing because any testing would include tests of the effect of the argument.

    ReplyDelete

Post a Comment