bytecount
authorKlaus Kaempf <kkaempf@suse.de>
Thu, 7 Aug 2008 16:03:20 +0000 (16:03 +0000)
committerKlaus Kaempf <kkaempf@suse.de>
Thu, 7 Aug 2008 16:03:20 +0000 (16:03 +0000)
swig/ruby/tests/bytecount.rb [new file with mode: 0755]

diff --git a/swig/ruby/tests/bytecount.rb b/swig/ruby/tests/bytecount.rb
new file mode 100755 (executable)
index 0000000..cb1b309
--- /dev/null
@@ -0,0 +1,22 @@
+#
+# Test Bytecount
+#
+
+$:.unshift "../../../build/swig/ruby"
+
+
+# test loading of extension
+require 'test/unit'
+
+class LoadTest < Test::Unit::TestCase
+  def test_loading
+    require 'zypp'
+
+    g = Zypp::ByteCount.new(Zypp::ByteCount.G)
+    assert g
+    gb = Zypp::ByteCount.new(Zypp::ByteCount.GB)
+    assert gb
+    k = Zypp::ByteCount.new(Zypp::ByteCount.K)
+    assert k.to_i == 1024
+  end
+end