Browse Source

* fixed EOL for non-linux

peter 25 years ago
parent
commit
5488c7d8ab
1 changed files with 11 additions and 4 deletions
  1. 11 4
      fcl/tests/testz2.pp

+ 11 - 4
fcl/tests/testz2.pp

@@ -2,17 +2,24 @@ Program testz2;
 
 uses zstream;
 
+const
+{$ifdef linux}
+  eol=#10;
+{$else}
+  eol=#10#13;
+{$endif}
+
 Var F : TGZfileStream;
     S : String;
     i :longint;
     c : char;
 begin
   Writeln ('Creating file.');
-  S:='This is a sentence'#10;
+  S:='This is a sentence'+eol;
   F:=TGZFileStream.create('test.gz',gzopenWrite);
-  For I:=1 to 10 do 
+  For I:=1 to 10 do
     F.Write(S[1],Length(S));
-  f.Free;  
+  f.Free;
   Writeln ('Done.');
   Writeln ('Reopening file for read.');
   F:=TGZFileStream.Create('test.gz',gzopenread);
@@ -20,6 +27,6 @@ begin
   While F.Read(C,SizeOf(c))<>0 do
     write(c);
   F.free;
-  Writeln('Done.');  
+  Writeln('Done.');
 end.