summaryrefslogtreecommitdiffstats
path: root/lua/tests/070-optargs.lua
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-11-17 10:10:13 +0000
committerRichard W.M. Jones <rjones@redhat.com>2012-11-17 20:02:42 +0000
commitff8bfd3e92f21955d0a91b481583131f356b8fe4 (patch)
tree7c3b36c732ea0b83209180099ba03f5ef1948238 /lua/tests/070-optargs.lua
parent4a2e8e89577ad4031aba1b2e5afb65ca58c2c39d (diff)
downloadlibguestfs-ff8bfd3e92f21955d0a91b481583131f356b8fe4.tar.gz
libguestfs-ff8bfd3e92f21955d0a91b481583131f356b8fe4.tar.xz
libguestfs-ff8bfd3e92f21955d0a91b481583131f356b8fe4.zip
Add Lua bindings.
These are relatively complete, although only lightly tested. Missing: - events - last_errno - user_cancel
Diffstat (limited to 'lua/tests/070-optargs.lua')
-rwxr-xr-xlua/tests/070-optargs.lua25
1 files changed, 25 insertions, 0 deletions
diff --git a/lua/tests/070-optargs.lua b/lua/tests/070-optargs.lua
new file mode 100755
index 00000000..fe0ec753
--- /dev/null
+++ b/lua/tests/070-optargs.lua
@@ -0,0 +1,25 @@
+#!/usr/bin/lua
+-- libguestfs Lua bindings -*- lua -*-
+-- Copyright (C) 2012 Red Hat Inc.
+--
+-- This program is free software; you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation; either version 2 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program; if not, write to the Free Software
+-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+require "guestfs"
+
+local g = Guestfs.create ()
+
+g:add_drive ("/dev/null")
+g:add_drive ("/dev/null", { readonly = true })
+g:add_drive ("/dev/null", { format = "raw", readonly = false })