1 module ztest
/*is aliced*/;
10 // ////////////////////////////////////////////////////////////////////////// //
11 enum ArcName
= "z00.arz";
12 enum FileName
= "arsd.cgi.Cgi.request.html";
13 enum DirName
= "experimental-docs";
16 // ////////////////////////////////////////////////////////////////////////// //
17 void main (string
[] args
) {
20 writeln("opening archive...");
21 arc
.openArchive(args
.length
> 1 ? args
[1] : ArcName
);
22 writeln(arc
.files
.length
, " files found");
25 auto fl
= File(DirName
~"/"~FileName
);
26 ofile
= new ubyte[](cast(uint)fl
.size
);
30 auto fl
= arc
.open(args
.length
> 2 ? args
[2] : FileName
);
31 writeln("size: ", fl
.size
);
33 foreach (immutable _
; 0..1000000) {
35 uint npos
= uniform
!"[)"(0, fl
.size
);
39 auto r
= fl
.rawRead(b
[]);
40 if (r
.length
!= b
.length
) {
41 writeln("opos=", opos
, "; npos=", npos
);
44 if (b
[0] != ofile
[npos
]) {
45 writeln("opos=", opos
, "; npos=", npos
, "; ofile[npos]=", ofile
[npos
], "; b[0]=", b
[0]);