File: zz-GtkRecentChooserDialog.t

package info (click to toggle)
libgtk3-perl 0.038-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 380 kB
  • sloc: perl: 4,228; makefile: 11
file content (47 lines) | stat: -rw-r--r-- 1,518 bytes parent folder | download | duplicates (4)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/perl
#
# Originally copied from Gtk2/t/GtkRecentChooserDialog.t
#

BEGIN { require './t/inc/setup.pl' }

use strict;
use warnings;

if (on_unthreaded_freebsd ()) {
  plan skip_all => 'need a perl built with "-pthread" on freebsd';
} else {
  plan tests => 12;
}

my $window = Gtk3::Window->new;
my $manager = Gtk3::RecentManager->new;

my $chooser = Gtk3::RecentChooserDialog->new ('Test', $window);
isa_ok ($chooser, 'Gtk3::RecentChooser');
isa_ok ($chooser, 'Gtk3::RecentChooserDialog');

$chooser = Gtk3::RecentChooserDialog->new ('Test', undef);
isa_ok ($chooser, 'Gtk3::RecentChooser');
isa_ok ($chooser, 'Gtk3::RecentChooserDialog');

$chooser = Gtk3::RecentChooserDialog->new_for_manager ('Test', $window, $manager);
isa_ok ($chooser, 'Gtk3::RecentChooser');
isa_ok ($chooser, 'Gtk3::RecentChooserDialog');

$chooser = Gtk3::RecentChooserDialog->new_for_manager ('Test', undef, $manager);
isa_ok ($chooser, 'Gtk3::RecentChooser');
isa_ok ($chooser, 'Gtk3::RecentChooserDialog');

$chooser = Gtk3::RecentChooserDialog->new ('Test', $window, 'gtk-ok' => 'ok');
isa_ok ($chooser, 'Gtk3::RecentChooser');
isa_ok ($chooser, 'Gtk3::RecentChooserDialog');

$chooser = Gtk3::RecentChooserDialog->new_for_manager ('Test', $window, $manager, 'gtk-ok' => 'ok', 'gtk-cancel' => 'cancel');
isa_ok ($chooser, 'Gtk3::RecentChooser');
isa_ok ($chooser, 'Gtk3::RecentChooserDialog');

__END__

Copyright (C) 2003-2012 by the gtk2-perl team (see the file AUTHORS for the
full list).  See LICENSE for more information.