Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2005-12

SysUtils.ExtractFileDrive inconsistent

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi

I am busy porting a Delphi application to Free Pascal & Lazarus. Luckily I have a 1400 unit tests to help me along. Running the following unit test under Lazarus & Delphi produces different results! It fails under Free Pascal. I traced the difference to the ExtractFileDrive call. Under Delphi it returns 'c:' and under FPC it returns ''. This was all run under Windows 2000 and FPC 2.0.1

CheckEquals( '', tiUtils.tiRemoveDrive('c:'), 'Failed on 1' );
--------------  CUT  --------------------
function tiRemoveDrive( pStrPath : string ) : string ;
var
   sDrive : string ;
begin
   sDrive := extractFileDrive( pStrPath ) ;
   if sDrive  '' then begin
     result := copy( pStrPath, length( sDrive )+1, length( pStrPath ) -
                     length( sDrive )) ;
   end else begin
     result := pStrPath ;
   end ;
end ;
--------------  CUT  --------------------

Regards,
- Graeme -

Reply by email

Peter Vreman
to Graeme Geldenhuys
Show quoted text 8 lines
Hi I am busy porting a Delphi application to Free Pascal & Lazarus. Luckily I have a 1400 unit tests to help me along. Running the following unit test under Lazarus & Delphi produces different results! It fails under Free Pascal. I traced the difference to the ExtractFileDrive call. Under Delphi it returns 'c:' and under FPC it returns ''. This was all run under Windows 2000 and FPC 2.0.1

Please report bugs and incompatibilities in the bug repository with complete source codes to reproduce. Reports mailed to the mailinglist tend to be forgotten.

Reply by email

Graeme Geldenhuys
to Peter Vreman
Peter Vreman wrote
Please report bugs and incompatibilities in the bug repository with complete source codes to reproduce. Reports mailed to the mailinglist tend to be forgotten.

Will do! Is there a way to search for bugs without having to list all known bugs first. It take quite long to load that page, and will only get slower over time. Something like what the Lazarus project is using.

The website I am using is
http://www.freepascal.org/bugs/db.php3

Regards,
- Graeme -

Reply by email

Daniël Mantione
to Graeme Geldenhuys

Op Mon, 12 Dec 2005, schreef Graeme Geldenhuys:

Show quoted text 12 lines
Peter Vreman wrote: > Please report bugs and incompatibilities in the bug repository with > complete source codes to reproduce. Reports mailed to the mailinglist > tend > to be forgotten. Will do! Is there a way to search for bugs without having to list all known bugs first. It take quite long to load that page, and will only get slower over time. Something like what the Lazarus project is using. The website I am using is http://www.freepascal.org/bugs/db.php3

A new bugtracker is in development by Michael.

Daniël

Reply by email