mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 06:19:28 +02:00
parent
544cf539e1
commit
44d9f35eef
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -7779,6 +7779,7 @@ tests/webtbs/tw10072.pp svneol=native#text/plain
|
||||
tests/webtbs/tw10203.pp svneol=native#text/plain
|
||||
tests/webtbs/tw1021.pp svneol=native#text/plain
|
||||
tests/webtbs/tw10210.pp svneol=native#text/plain
|
||||
tests/webtbs/tw10224.pp svneol=native#text/plain
|
||||
tests/webtbs/tw1023.pp svneol=native#text/plain
|
||||
tests/webtbs/tw1041.pp svneol=native#text/plain
|
||||
tests/webtbs/tw1044.pp svneol=native#text/plain
|
||||
|
31
tests/webtbs/tw10224.pp
Executable file
31
tests/webtbs/tw10224.pp
Executable file
@ -0,0 +1,31 @@
|
||||
{$mode objfpc}
|
||||
uses
|
||||
SysUtils;
|
||||
|
||||
var
|
||||
err : boolean;
|
||||
|
||||
procedure expect(const v,s:string);
|
||||
var
|
||||
s1 : string;
|
||||
begin
|
||||
s1:=SetDirSeparators(s);
|
||||
writeln('relative path: "',v,'"');
|
||||
if v<>s then
|
||||
begin
|
||||
writeln('Error, expected "',s,'"');
|
||||
err:=true;
|
||||
end;
|
||||
end;
|
||||
|
||||
begin
|
||||
expect(ExtractRelativePath('c:\one\two\three\test.pp','c:\one\two\three\four\five\test2.pp'),'four\five\test2.pp');
|
||||
expect(ExtractRelativePath('c:\one\two\three\four\five\test.pp','c:\one\two\three\test2.pp'),'..\..\test2.pp');
|
||||
expect(ExtractRelativePath('c:\one\two\three\','c:\one\two\three\four\five\test.pp'),'four\five\test.pp');
|
||||
expect(ExtractRelativePath('c:\one\two\three\four\five\','c:\one\two\three\test.pp'),'..\..\test.pp');
|
||||
expect(ExtractRelativePath('c:\one\two\three\','c:\one\two\three\four\five\'),'four\five\');
|
||||
expect(ExtractRelativePath('c:\one\two\three\four\five\','c:\one\two\three\'),'..\..\');
|
||||
if err then
|
||||
halt(1);
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user