test starting of zypp
authorKlaus Kaempf <kkaempf@suse.de>
Thu, 7 Aug 2008 15:55:02 +0000 (15:55 +0000)
committerKlaus Kaempf <kkaempf@suse.de>
Thu, 7 Aug 2008 15:55:02 +0000 (15:55 +0000)
swig/perl5/tests/starting.pl [new file with mode: 0755]
swig/python/tests/starting.py [new file with mode: 0755]
swig/ruby/tests/starting.rb [new file with mode: 0755]

diff --git a/swig/perl5/tests/starting.pl b/swig/perl5/tests/starting.pl
new file mode 100755 (executable)
index 0000000..0e2b72d
--- /dev/null
@@ -0,0 +1,8 @@
+#!/usr/bin/perl
+
+use lib '../../../build/swig/perl5';
+
+use zypp;
+
+$zfactory = zyppc::ZYppFactory_instance();
+$zypp = $zfactory->getZYpp;
diff --git a/swig/python/tests/starting.py b/swig/python/tests/starting.py
new file mode 100755 (executable)
index 0000000..ce9258d
--- /dev/null
@@ -0,0 +1,14 @@
+import unittest
+
+import sys
+sys.path.insert(0, '../../../build/swig/python')
+
+class TestSequenceFunctions(unittest.TestCase):
+    
+  def testloading(self):
+    import zypp
+    zypp = zypp.ZYppFactory.instance().getZYpp()
+    assert zypp
+
+if __name__ == '__main__':
+  unittest.main()
diff --git a/swig/ruby/tests/starting.rb b/swig/ruby/tests/starting.rb
new file mode 100755 (executable)
index 0000000..be7bfed
--- /dev/null
@@ -0,0 +1,17 @@
+#
+# Test starting of zypp
+#
+
+$:.unshift "../../../build/swig/ruby"
+
+
+# test loading of extension
+require 'test/unit'
+
+class LoadTest < Test::Unit::TestCase
+  def test_loading
+    require 'zypp'
+    zypp = Zypp::ZYppFactory::instance.get_zypp
+    assert zypp
+  end
+end