Sha256: 677c8c8b211280f96607011e56f021215b90af5341b342c16e50eba1e81a974a

Contents?: true

Size: 756 Bytes

Versions: 6

Compression:

Stored size: 756 Bytes

Contents

#!/usr/bin/env ruby
# Test passing a particular struct array through a variant
# https://trac.luon.net/ruby-dbus/ticket/27
require "dbus-openplacos"
session_bus = DBus::ASessionBus.new
svc = session_bus.service("org.ruby.service")
obj = svc.object("/org/ruby/MyInstance")
obj.introspect                  # necessary
obj.default_iface = "org.ruby.SampleInterface"
# The bug is probably alignment related so whether it triggers
# depends also on the combined length of service, interface,
# and method names. Luckily here it works out.
triple = ['a(uuu)', []]
obj.test_variant(triple)
quadruple = ['a(uuuu)', []]     # a(uuu) works fine
# The bus disconnects us because of malformed message,
# code 12: DBUS_INVALID_TOO_MUCH_DATA
obj.test_variant(quadruple)

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ruby-dbus-openplacos-0.7.2.2 test/t3-ticket27.rb
ruby-dbus-openplacos-0.7.2.1 test/t3-ticket27.rb
ruby-dbus-openplacos-0.7.2 test/t3-ticket27.rb
ruby-dbus-openplacos-0.7.0 test/t3-ticket27.rb
ruby-dbus-openplacos-0.6.2 test/t3-ticket27.rb
ruby-dbus-openplacos-0.6.1 test/t3-ticket27.rb