~ubuntu-branches/debian/experimental/libnet-dbus-perl/experimental

« back to all changes in this revision

Viewing changes to t/15-message.t

  • Committer: Package Import Robot
  • Author(s): intrigeri, gregor herrmann, Salvatore Bonaccorso, intrigeri
  • Date: 2015-03-21 01:29:19 UTC
  • mfrom: (1.2.3)
  • Revision ID: package-import@ubuntu.com-20150321012919-l0oy52ke591xi4fg
Tags: 1.1.0-1
[ gregor herrmann ]
* Strip trailing slash from metacpan URLs.

[ Salvatore Bonaccorso ]
* Update Vcs-Browser URL to cgit web frontend

[ intrigeri ]
* Import new upstream release (filtering out .git and .gitignore,
  that were erroneously included in the upstream tarball).
* debian/copyright: update license and copyright information.
* Declare compliance with Standards-Version 3.9.6, no change required.
* Dropped all patches, that were applied upstream.
* Update Lintian line number that the manpage-has-errors-from-man
  Lintian override affects.
* 0001-Fix-spelling-error-in-POD.patch: new patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# -*- perl -*-
2
 
use Test::More tests => 33;
 
2
use Test::More tests => 35;
 
3
 
 
4
use File::Temp qw/tempfile/;
3
5
 
4
6
use strict;
5
7
use warnings;
31
33
$iter->append_string("Hello world");
32
34
$iter->append_double(1.424141);
33
35
 
 
36
my $fh = tempfile(UNLINK => 1);
 
37
print $fh "Hello World\n";
 
38
seek $fh, 0, 0;
 
39
 
 
40
$iter->append_unix_fd($fh->fileno);
 
41
 
34
42
$iter->append_array(["one", "two", "three"], [&Net::DBus::Binding::Message::TYPE_STRING]);
35
43
 
36
44
$iter->append_dict({ "one" => "foo", "two" => "bar"}, [&Net::DBus::Binding::Message::TYPE_STRING,
70
78
ok($d > 1.424100 && $d < 1.424200, "double");
71
79
 
72
80
ok($iter->next(), "next");
 
81
my $fh2 = IO::Handle->new();
 
82
$fh2->fdopen($iter->get_unix_fd(), "r");
 
83
my $data = <$fh2>;
 
84
ok($data eq "Hello World\n");
 
85
 
 
86
ok($iter->next(), "next");
73
87
is_deeply($iter->get_array(&Net::DBus::Binding::Message::TYPE_STRING), ["one", "two", "three"], "array");
74
88
 
75
89
ok($iter->next(), "next");