File: GtkFileChooserButton.t

package info (click to toggle)
libgtk2-perl 1%3A1.140-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 3,808 kB
  • ctags: 609
  • sloc: perl: 14,245; ansic: 118; makefile: 70
file content (42 lines) | stat: -rw-r--r-- 1,336 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/perl -w
use strict;
use Gtk2::TestHelper
  tests => 9,
  at_least_version => [2, 6, 0, "GtkFileChooserButton is new in 2.6"];

# $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/t/GtkFileChooserButton.t,v 1.5 2006/08/07 18:36:04 kaffeetisch Exp $

my $dialog = Gtk2::FileChooserDialog -> new("Urgs", undef, "open",
                                            "gtk-cancel" => "cancel",
                                            "gtk-ok" => "ok");

my $button = Gtk2::FileChooserButton -> new("Urgs", "open");
isa_ok($button, "Gtk2::FileChooserButton");
ginterfaces_ok($button);

$button = Gtk2::FileChooserButton -> new_with_backend("Urgs", "open", "backend");
isa_ok($button, "Gtk2::FileChooserButton");
isa_ok($button, "Gtk2::FileChooser");

$button = Gtk2::FileChooserButton -> new_with_dialog($dialog);
isa_ok($button, "Gtk2::FileChooserButton");
isa_ok($button, "Gtk2::FileChooser");

$button -> set_title("Urgs");
is($button -> get_title(), "Urgs");

$button -> set_width_chars(23);
is($button -> get_width_chars(), 23);

SKIP: {
  skip "new 2.10 stuff", 1
    unless Gtk2 -> CHECK_VERSION(2, 10, 0);

  $button -> set_focus_on_click(TRUE);
  is($button -> get_focus_on_click(), TRUE);
}

__END__

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