File: 01-FF-Value-Fixed.t

package info (click to toggle)
libwww-mechanize-formfiller-perl 0.10-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 260 kB
  • ctags: 42
  • sloc: perl: 1,504; makefile: 7
file content (18 lines) | stat: -rwxr-xr-x 473 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use strict;

my @values;
BEGIN {
  @values = ("foo",1,"",0,undef);
};

use Test::More tests => 1 + scalar @values * 3;

use_ok("WWW::Mechanize::FormFiller::Value::Fixed");

for my $value (@values) {
  my $v = WWW::Mechanize::FormFiller::Value::Fixed->new("foo",$value);
  isa_ok($v,"WWW::Mechanize::FormFiller::Value::Fixed");
  can_ok($v,"value");
  my $pvalue = $value ||"";
  is($v->value(undef),$value,"Fixed returns the correct value for $pvalue");
};