Fix for failures on FileNameCaseSensitive systems
authorpierre <pierre@freepascal.org>
Mon, 2 Feb 2015 21:49:36 +0000 (21:49 +0000)
committerPeter Michael Green <plugwash@debian.org>
Thu, 24 Jan 2019 23:27:02 +0000 (23:27 +0000)
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@29609 3ad0048d-3df7-0310-abae-a5850022a9f2

Gbp-Pq: Name fix_texpfncase_test.patch

fpcsrc/tests/test/units/sysutils/texpfncase.pp

index 3a6e1cac73f7a1cf61f1de0ba1d7e1dd6aecf277..a4adf805e7ffa1e0c014c0d698781bdf9bcdf3d5 100644 (file)
@@ -57,8 +57,9 @@ var
   Match: TFilenameCaseMatch;
 begin
   FN2 := ExpandFileNameCase (FN1, Match);
-  if ((ExpReturn <> '') and (FN2 <> ExpReturn) or (Match <> ExpMatch)) and
-     not(FileNameCaseSensitive and (Match=mkAmbiguous) and (UpperCase(FN2)<>UpperCase(ExpReturn)))  then
+  if (Match <> ExpMatch) or ((ExpReturn <> '') and (FN2 <> ExpReturn) and
+     ((Match <> mkAmbiguous) or not (FileNameCaseSensitive) or
+                               (UpperCase (FN2) <> UpperCase (ExpReturn)))) then
    begin
     Inc (Failed);
     WriteLn ('Error: Input = ', FN1, ', Output = ', FN2, ' (expected ', ExpReturn, '), MatchFound = ',