summaryrefslogtreecommitdiffstats
path: root/lua/tests/060-readdir.lua
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-11-19 13:00:52 +0000
committerRichard W.M. Jones <rjones@redhat.com>2012-11-19 14:01:40 +0000
commitf77ddb9e114e560724d6548499047ae6894ab59c (patch)
tree6341c27ca32fb5e1262f1263974991a1d6357b22 /lua/tests/060-readdir.lua
parentd14557d434de5cb1c9754ae0f3e8e820e0a46694 (diff)
downloadlibguestfs-f77ddb9e114e560724d6548499047ae6894ab59c.tar.gz
libguestfs-f77ddb9e114e560724d6548499047ae6894ab59c.tar.xz
libguestfs-f77ddb9e114e560724d6548499047ae6894ab59c.zip
lua: Various fixes and enhancements:
- add support for events (with test) - test progress messages - update documentation to describe events - refactor handle closing code - refactor error code - use 'assert' in test code instead of 'if ... then error end'
Diffstat (limited to 'lua/tests/060-readdir.lua')
-rwxr-xr-xlua/tests/060-readdir.lua8
1 files changed, 2 insertions, 6 deletions
diff --git a/lua/tests/060-readdir.lua b/lua/tests/060-readdir.lua
index dd060840..07e8e3ba 100755
--- a/lua/tests/060-readdir.lua
+++ b/lua/tests/060-readdir.lua
@@ -51,12 +51,8 @@ print_dirs (dirs)
-- Slots 1, 2, 3 contain "." and ".." and "lost+found" respectively.
-if (dirs[4]["name"] ~= "p") then
- error "incorrect name in slot 4"
-end
-if (dirs[5]["name"] ~= "q") then
- error "incorrect name in slot 5"
-end
+assert (dirs[4]["name"] == "p", "incorrect name in slot 4")
+assert (dirs[5]["name"] == "q", "incorrect name in slot 5")
g:shutdown ()