[libnet-dbus-perl] 202/335: Added test suite for Avahi XML format which caused trouble previously
Intrigeri
intrigeri at moszumanska.debian.org
Sat Mar 21 01:07:56 UTC 2015
This is an automated email from the git hooks/post-receive script.
intrigeri pushed a commit to branch experimental
in repository libnet-dbus-perl.
commit 6f0bcb33a27ce7a8847003adce56c03f842b783f
Author: Daniel P. Berrange <berrange at redhat.com>
Date: Mon Jun 12 20:23:35 2006 -0400
Added test suite for Avahi XML format which caused trouble previously
---
t/42-object-introspect-avahi.t | 98 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 98 insertions(+)
diff --git a/t/42-object-introspect-avahi.t b/t/42-object-introspect-avahi.t
new file mode 100644
index 0000000..f36851f
--- /dev/null
+++ b/t/42-object-introspect-avahi.t
@@ -0,0 +1,98 @@
+# -*- perl -*-
+use Test::More tests => 10;
+
+use strict;
+use warnings;
+
+BEGIN {
+ use_ok('Net::DBus::Binding::Introspector');
+};
+
+local $/ = undef;
+my $xml = <DATA>;
+
+my $introspector = Net::DBus::Binding::Introspector->new(object_path => "/org/freedesktop/Avahi/ServiceBrowser",
+ xml => $xml);
+
+isa_ok($introspector, "Net::DBus::Binding::Introspector");
+
+ok($introspector->has_interface("org.freedesktop.DBus.Introspectable"),
+ "org.freedesktop.DBus.Introspectable interface present");
+
+ok($introspector->has_interface("org.freedesktop.Avahi.ServiceBrowser"),
+ "org.freedesktop.Avahi.ServiceBrowser interface present");
+
+ok($introspector->has_method("Free"), "Free method present");
+ok($introspector->has_signal("ItemNew"), "ItemNew signal present");
+ok($introspector->has_signal("ItemRemove"), "ItemRemove signal present");
+ok($introspector->has_signal("Failure"), "Failure signal present");
+ok($introspector->has_signal("AllForNow"), "AllForNow signal present");
+ok($introspector->has_signal("CacheExhausted"), "CacheExhausted signal present");
+
+
+__DATA__
+<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
+<?xml-stylesheet type="text/xsl" href="introspect.xsl"?>
+<!DOCTYPE node SYSTEM "introspect.dtd">
+
+<!-- $Id: ServiceBrowser.introspect 948 2005-11-12 18:55:52Z lennart $ -->
+
+<!--
+ This file is part of avahi.
+
+ avahi is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ avahi 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 Lesser General Public
+ License along with avahi; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA.
+-->
+
+<node>
+
+ <interface name="org.freedesktop.DBus.Introspectable">
+ <method name="Introspect">
+ <arg name="data" type="s" direction="out" />
+ </method>
+ </interface>
+
+ <interface name="org.freedesktop.Avahi.ServiceBrowser">
+
+ <method name="Free"/>
+
+ <signal name="ItemNew">
+ <arg name="interface" type="i"/>
+ <arg name="protocol" type="i"/>
+ <arg name="name" type="s"/>
+ <arg name="type" type="s"/>
+ <arg name="domain" type="s"/>
+ <arg name="flags" type="u"/>
+ </signal>
+
+ <signal name="ItemRemove">
+ <arg name="interface" type="i"/>
+ <arg name="protocol" type="i"/>
+ <arg name="name" type="s"/>
+ <arg name="type" type="s"/>
+ <arg name="domain" type="s"/>
+ <arg name="flags" type="u"/>
+ </signal>
+
+ <signal name="Failure">
+ <arg name="error" type="s"/>
+ </signal>
+
+ <signal name="AllForNow"/>
+
+ <signal name="CacheExhausted"/>
+
+ </interface>
+</node>
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libnet-dbus-perl.git
More information about the Pkg-perl-cvs-commits
mailing list