Skip to content

Commit bd60259

Browse files
author
Evan Klitzke
committed
make unit test more elegant lua (i think)
1 parent 197f83c commit bd60259

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test.lua

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
require("bz2")
22

3+
-- read in a file and display the uncompressed data to stdout (i.e. this
4+
-- behaves identically to bzcat)
35
b = bz2.read_open("access_log.bz2")
4-
while 1 do
5-
text = bz2.read(b, 10)
6+
text = bz2.read(b, 1024)
7+
while text ~= nil do
8+
io.write(text)
9+
text = bz2.read(b, 1024)
610
if text == nil then
711
break
812
end

0 commit comments

Comments
 (0)