]> iEval git - pod-constants.git/commitdiff
Add a test for delete_hook
authorMarius Gavrilescu <marius@ieval.ro>
Fri, 17 Jul 2015 12:59:41 +0000 (15:59 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Fri, 17 Jul 2015 12:59:41 +0000 (15:59 +0300)
t/01-constants.t

index 22ef0388263ebad5749da9428f97b07283e920c6..b68d3499c389fa58b9a784e613f6a126aa0cd636 100644 (file)
@@ -4,7 +4,7 @@ use warnings;
 use lib 't';
 
 use File::Temp qw/tempfile/;
-use Test::More tests => 19;
+use Test::More tests => 20;
 
 our ($section_1, $section_2, $section_3, $section_4, %options);
 
@@ -30,6 +30,9 @@ sub run_parser {
                section_2 => \$section_2,
                section_3 => sub { tr/[a-z]/[A-Z]/; $section_3 = $_ },
                section_4 => sub { eval },
+               'GUI parameters'  => sub {
+                       Pod::Constants::delete_hook('*item')
+               },
                'command line parameters' => sub {
                        Pod::Constants::add_hook('*item' => \&handle_item)
                });
@@ -96,6 +99,7 @@ $TestManPage::myvar = $TestManPage::html = undef;
 @TestManPage::myarray = ();
 
 is $options{foo}->{options}->[0], "-f", "Pod::Constants::add_hook";
+ok !exists $options{gtk}, 'Pod::Constants::remove_hook';
 
 =head2 section_1
 
@@ -127,4 +131,16 @@ This does something cool.
 
 This also does something pretty cool.
 
+=head1 GUI parameters
+
+the following GUI parameters are supported
+
+=item -g, --gtk
+
+Use a GTK+ look-and-feel
+
+=item -q, --qt
+
+Use a Qt look-and-feel
+
 =cut
This page took 0.027533 seconds and 4 git commands to generate.