summaryrefslogtreecommitdiffstats
path: root/lua/tests
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-11-19 17:13:14 +0000
committerRichard W.M. Jones <rjones@redhat.com>2012-11-19 17:13:14 +0000
commit556fc92e8adc6c10e1608dafaca89d9cac581fb7 (patch)
tree21b02ce06d8316393c59211acd43de89ce459e8e /lua/tests
parentbc03a48c7132c75072003fcdd54930db3b70721e (diff)
downloadlibguestfs-556fc92e8adc6c10e1608dafaca89d9cac581fb7.tar.gz
libguestfs-556fc92e8adc6c10e1608dafaca89d9cac581fb7.tar.xz
libguestfs-556fc92e8adc6c10e1608dafaca89d9cac581fb7.zip
lua: Test globals in Guestfs.* namespace.
Diffstat (limited to 'lua/tests')
-rwxr-xr-xlua/tests/015-globals.lua26
1 files changed, 26 insertions, 0 deletions
diff --git a/lua/tests/015-globals.lua b/lua/tests/015-globals.lua
new file mode 100755
index 00000000..ee69f40c
--- /dev/null
+++ b/lua/tests/015-globals.lua
@@ -0,0 +1,26 @@
+#!/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"
+
+assert (Guestfs._COPYRIGHT)
+print ("_COPYRIGHT = ", Guestfs._COPYRIGHT)
+assert (Guestfs._DESCRIPTION)
+print ("_DESCRIPTION = ", Guestfs._DESCRIPTION)
+assert (Guestfs._VERSION)
+print ("_VERSION = ", Guestfs._VERSION)