3 { Copyright (C) 2009 Bas Steendijk and Peter Green
\r
4 For conditions of distribution and use, see copyright notice in zlib_license.txt
\r
5 which is included in the package
\r
6 ----------------------------------------------------------------------------- }
\r
9 program testreadtxt2;
\r
10 uses readtxt2, classes;
\r
15 procedure writestring(var f: file; s : string);
\r
17 blockwrite(f,s[1],length(s));
\r
21 assignfile(f,'mixed.txt');
\r
23 writestring(f,'DOS'#13#10);
\r
24 writestring(f,'UNIX'#10);
\r
25 writestring(f,'MAC'#13);
\r
26 writestring(f,'NONE');
\r
28 t := treadtxt.createf('mixed.txt');
\r
29 if t.readline = 'DOS' then writeln('DOS success') else writeln('DOS fail');
\r
30 if t.readline = 'UNIX' then writeln('UNIX success') else writeln('UNIX fail');
\r
31 if t.readline = 'MAC' then writeln('MAC success') else writeln('MAC fail');
\r
32 if t.readline = 'NONE' then writeln('NONE success') else writeln('NONE fail');
\r
35 //make things a little easier to test in the delphi GUI
\r