summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbs/tw1479.pp
blob: 1ab65c26d927cd2f611365953514beff71637da0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{$ifdef fpc}{$mode objfpc}{$endif}

uses
  sysutils;

const
  fname = 'tw1479.tmp';

 ThisDir = '.'+DirectorySeparator;
var
  fn : string;
  f : text;
begin
  assign(f,fname);
  rewrite(f);
  writeln(f,'hello');
  close(f);

  fn:=FileSearch(fname,PathSeparator);
  writeln('found: ',fn);
  if fn<>fname then
   halt(1);
  fn:=FileSearch(ThisDir+fname,PathSeparator);
  writeln('found: ',fn);
  if fn<>ThisDir+fname then
   halt(1);
  erase(f);
end.