Browse Source

* fix one test failure for unixes

(cherry picked from commit 87321a0e67ceaac9859cf7aaf92f6d3c515bac44)
florian 2 years ago
parent
commit
e75b89e8e6

+ 1 - 1
packages/vcl-compat/src/system.ioutils.pp

@@ -388,7 +388,7 @@ class constructor TPath.Create;
 var
 var
   C : Char;
   C : Char;
 begin
 begin
-  FAltDirectorySeparatorChar:=#0;;
+  FAltDirectorySeparatorChar:=#0;
   For C in AllowDirectorySeparators do
   For C in AllowDirectorySeparators do
     if (C<>System.DirectorySeparator) and (FAltDirectorySeparatorChar=#0) then
     if (C<>System.DirectorySeparator) and (FAltDirectorySeparatorChar=#0) then
       FAltDirectorySeparatorChar:=C;
       FAltDirectorySeparatorChar:=C;

+ 2 - 0
packages/vcl-compat/tests/tciotuils.pas

@@ -1086,6 +1086,8 @@ procedure TTestTPath.TestAltDirectorySeparatorChar;
 begin
 begin
   {$ifdef Windows}
   {$ifdef Windows}
     AssertEquals('/',TPath.AltDirectorySeparatorChar);
     AssertEquals('/',TPath.AltDirectorySeparatorChar);
+  {$elseif defined(unix)}
+    AssertEquals('\',TPath.AltDirectorySeparatorChar);
   {$else}
   {$else}
     AssertEquals('/',TPath.AltDirectorySeparatorChar);
     AssertEquals('/',TPath.AltDirectorySeparatorChar);
   {$endif}
   {$endif}