File: 01-connect.t

package info (click to toggle)
libdesktop-notify-perl 0.05-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, forky, sid, trixie
  • size: 128 kB
  • sloc: perl: 177; makefile: 4
file content (28 lines) | stat: -rw-r--r-- 598 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!perl -T

use Test::More;

unless ($ENV{DBUS_SESSION_BUS_ADDRESS})
{
    plan skip_all => 'D-Bus session bus not running';
    exit 0;
}

plan tests => 3;

use_ok('Desktop::Notify');

my $notify;

eval { $notify = new Desktop::Notify };

ok($notify, 'connect with default options');

$notify = undef;
eval { $notify = new Desktop::Notify
           (bus => Net::DBus->session,
            service => 'org.freedesktop.Notifications',
            objpath => '/org/freedesktop/Notifications',
            objiface => 'org.freedesktop.Notifications') };

ok($notify, 'connect with explicit options');