summaryrefslogtreecommitdiff
path: root/swig/ruby/tests
diff options
context:
space:
mode:
authorKlaus Kaempf <kkaempf@suse.de>2008-08-07 16:03:20 +0000
committerKlaus Kaempf <kkaempf@suse.de>2008-08-07 16:03:20 +0000
commitc4937033e39b6be54a285514c99854e931f83f89 (patch)
treebf2ce750f90973d860453da6ab8a218ffe9bd486 /swig/ruby/tests
parent8082053336281085a3ad0a23b6851316f29ae602 (diff)
downloadlibzypp-bindings-c4937033e39b6be54a285514c99854e931f83f89.tar.gz
libzypp-bindings-c4937033e39b6be54a285514c99854e931f83f89.tar.bz2
libzypp-bindings-c4937033e39b6be54a285514c99854e931f83f89.zip
bytecount
Diffstat (limited to 'swig/ruby/tests')
-rwxr-xr-xswig/ruby/tests/bytecount.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/swig/ruby/tests/bytecount.rb b/swig/ruby/tests/bytecount.rb
new file mode 100755
index 0000000..cb1b309
--- /dev/null
+++ b/swig/ruby/tests/bytecount.rb
@@ -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