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