File: 14_password.t

package info (click to toggle)
libhtml-fillinform-perl 2.22-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 356 kB
  • sloc: perl: 649; makefile: 2
file content (39 lines) | stat: -rw-r--r-- 581 bytes parent folder | download | duplicates (7)
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
# -*- Mode: Perl; -*-

#!/usr/bin/perl -w

use CGI qw(:no_debug);
use HTML::FillInForm;
use Test;

BEGIN { plan tests => 2 }

local $/;
my $html = qq{<input type="password" name="foo">};
my $q = new CGI;
$q->param( foo => 'bar' );

{
    my $fif = new HTML::FillInForm;
    my $output = $fif->fill(
	scalarref => \$html,
	fobject   => $q,
	fill_password => 0,
    );

    ok($output !~ /value="bar"/);
}


{
    my $fif = new HTML::FillInForm;
    my $output = $fif->fill(
	scalarref => \$html,
	fobject   => $q,
#	fill_password => 1,
    );

    ok($output =~ /value="bar"/);
}