mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 23:47:52 +02:00
* Delete temporary files used by tests. It is important when remotely run testsuite at Pocket PC. Temp files are created in root folder and it is not good if the files are left.
git-svn-id: trunk@7760 -
This commit is contained in:
parent
bbd9f6f993
commit
a70eba78a6
@ -52,4 +52,5 @@ typecasting thing.}
|
||||
ReadLn(F,S); { Show that it worked, the same }
|
||||
WriteLn('That line again:',S); { line readed again! }
|
||||
Close(F); { Close it }
|
||||
Erase(F);
|
||||
end.
|
||||
|
@ -25,6 +25,7 @@ begin
|
||||
reset(fin);
|
||||
read(fin,b1);
|
||||
close(fin);
|
||||
erase(fin);
|
||||
if not b1[512*Mb]=1 then
|
||||
begin
|
||||
writeln('data err');
|
||||
|
@ -35,4 +35,5 @@ begin
|
||||
reset(fileof);
|
||||
test;
|
||||
close(fileof);
|
||||
erase(fileof);
|
||||
end.
|
||||
|
@ -43,4 +43,5 @@ begin
|
||||
readln(f,st);
|
||||
if st<>'Invalid Opcode' then halt(1);
|
||||
close(f);
|
||||
erase(f);
|
||||
end.
|
||||
|
@ -9,4 +9,5 @@ begin
|
||||
w:=20;
|
||||
write(outf, w);
|
||||
close(outf);
|
||||
erase(outf);
|
||||
end.
|
||||
|
@ -724,6 +724,7 @@ procedure testioqword;
|
||||
do_error(2101);
|
||||
end;
|
||||
end;
|
||||
erase(t);
|
||||
end;
|
||||
|
||||
procedure teststringqword;
|
||||
|
@ -72,6 +72,7 @@ Const S : String = '0123456789';
|
||||
Var Stream : TDosStream;
|
||||
Buf : String;
|
||||
L : word;
|
||||
f : file;
|
||||
|
||||
begin
|
||||
StreamError:= @StreamErrorProcedure;
|
||||
@ -119,4 +120,6 @@ begin
|
||||
Stream.Init('testobj.tmp',StOpenWrite);
|
||||
Stream.Truncate;
|
||||
Stream.Done;
|
||||
Assign(f,'testobj.tmp');
|
||||
Erase(f);
|
||||
end.
|
||||
|
@ -72,6 +72,7 @@ Const S : String = '0123456789';
|
||||
Var Stream : TBufStream;
|
||||
Buf : String;
|
||||
L : word;
|
||||
f : file;
|
||||
|
||||
begin
|
||||
StreamError:= @StreamErrorProcedure;
|
||||
@ -119,4 +120,6 @@ begin
|
||||
Stream.Init('testobj.tmp',StOpenWrite,8);
|
||||
Stream.Truncate;
|
||||
Stream.Done;
|
||||
Assign(f,'testobj.tmp');
|
||||
Erase(f);
|
||||
end.
|
||||
|
@ -17,6 +17,7 @@ var
|
||||
pStream2: PStream;
|
||||
lAux : Longint;
|
||||
error : boolean;
|
||||
f : file;
|
||||
begin
|
||||
error := false;
|
||||
Write('Error checking for object streams...');
|
||||
@ -35,6 +36,10 @@ begin
|
||||
|
||||
pStream2^.Free;
|
||||
pStream1^.Free;
|
||||
|
||||
Assign(f,csFName1);
|
||||
Erase(f);
|
||||
|
||||
if error then
|
||||
Begin
|
||||
WriteLn('FAILED! Errors are mixed up!');
|
||||
|
@ -31,4 +31,10 @@ BEGIN
|
||||
dateTime := IncMonth(Now, -1);
|
||||
if FileSetDate('datetest.dat', DateTimeToFileDate(dateTime))<>0 then
|
||||
do_error(1002);
|
||||
|
||||
if FileExists('datetest.dat') then
|
||||
begin
|
||||
Assign(f,'datetest.dat');
|
||||
Erase(f);
|
||||
end;
|
||||
END.
|
||||
|
@ -14,4 +14,5 @@ begin
|
||||
{ write should not be allowed for untyped files }
|
||||
write (dat,Buffer[j]);
|
||||
Close(dat);
|
||||
Erase(dat);
|
||||
end.
|
||||
|
@ -14,4 +14,5 @@ begin
|
||||
{ writeln should not be allowed for typed files }
|
||||
writeln (dat,Buffer[j]);
|
||||
Close(dat);
|
||||
Erase(dat);
|
||||
end.
|
||||
|
@ -36,4 +36,5 @@ begin
|
||||
if Foo.A<>4 then
|
||||
Halt(1);
|
||||
close(t);
|
||||
erase(t);
|
||||
end.
|
||||
|
@ -31,4 +31,6 @@ begin
|
||||
end;
|
||||
Close(dat);
|
||||
close(dat2);
|
||||
Erase(dat);
|
||||
Erase(dat2);
|
||||
end.
|
||||
|
@ -52,4 +52,6 @@ begin
|
||||
Writeln('Error reading I value, should be one');
|
||||
Halt(1);
|
||||
end;
|
||||
close(f);
|
||||
erase(f);
|
||||
end.
|
||||
|
@ -18,4 +18,5 @@ BEGIN
|
||||
writeln('FSearch didn''t find file in the current dir!');
|
||||
halt(1);
|
||||
end;
|
||||
erase(t);
|
||||
END.
|
||||
|
@ -24,4 +24,5 @@ begin
|
||||
writeln('found: ',fn);
|
||||
if fn<>ThisDir+fname then
|
||||
halt(1);
|
||||
erase(f);
|
||||
end.
|
||||
|
@ -32,6 +32,7 @@ end;
|
||||
var
|
||||
pTempStream: PMyStream;
|
||||
mem : sizeint;
|
||||
f : file;
|
||||
begin
|
||||
DoMem(mem);
|
||||
pTempStream := nil;
|
||||
@ -46,4 +47,6 @@ begin
|
||||
Writeln('Memory lost');
|
||||
Halt(1);
|
||||
end;
|
||||
Assign(f,'tw1658.tmp');
|
||||
Erase(f);
|
||||
end.
|
||||
|
@ -21,4 +21,6 @@ begin
|
||||
writeln('Error');
|
||||
halt(1);
|
||||
end;
|
||||
close(fin);
|
||||
erase(fin);
|
||||
end.
|
||||
|
@ -1,3 +1,4 @@
|
||||
{%skiptarget=wince}
|
||||
var
|
||||
f:file;
|
||||
p:pointer;
|
||||
@ -10,6 +11,7 @@ begin
|
||||
p:=nil;
|
||||
BlockWrite(f,p^,12345);
|
||||
Close(f);
|
||||
Erase(f);
|
||||
{$I+}
|
||||
i:=ioresult;
|
||||
writeln('IOResult: ',i);
|
||||
|
@ -56,5 +56,6 @@ begin
|
||||
stream2.free;
|
||||
testcomp1.free;
|
||||
testcomp2.free;
|
||||
deletefile('test.txt');
|
||||
end;
|
||||
end.
|
||||
|
@ -26,4 +26,5 @@ begin
|
||||
ReadLn (f, s); // Warning!
|
||||
|
||||
Close (f);
|
||||
Erase (f);
|
||||
end.
|
||||
|
@ -13,5 +13,6 @@ begin
|
||||
assign(input,'tw3977.tmp');
|
||||
reset(input);
|
||||
readln(n);
|
||||
close(output);
|
||||
close(input);
|
||||
erase(input);
|
||||
end.
|
||||
|
@ -24,6 +24,8 @@ begin
|
||||
reset(input);
|
||||
readln(v, k);
|
||||
readln(a1, a2, b1, b2, c1, c2);
|
||||
close(input);
|
||||
erase(input);
|
||||
end;
|
||||
|
||||
procedure dfs(a, b, c, k1: Byte);
|
||||
|
@ -104,5 +104,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
writeln('ok. done.');
|
||||
DeleteFile('testfile.tmp');
|
||||
end.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user