File: zz-GtkRecentChooserDialog.t

package info (click to toggle)
libgtk3-perl 0.018-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 352 kB
  • ctags: 93
  • sloc: perl: 3,656; makefile: 11
file content (46 lines) | stat: -rw-r--r-- 1,471 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/perl
#
# Originally copied from Gtk2/t/GtkRecentChooserDialog.t
#

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

use strict;
use warnings;

use File::Temp qw{tempdir};
$ENV{HOME} = tempdir(CLEANUP => 1);

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.