line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#!perl |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
9
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
33
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
25
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
5
|
use Digest; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
19
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
6
|
use Test::More; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
9
|
1
|
|
|
1
|
|
235
|
use Test::BDD::Cucumber::StepFile; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
1515
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
Dado qr/la clase "(\w+)"/, sub { |
12
|
1
|
|
|
1
|
|
193
|
use_ok( C->matches->[0] ); |
|
1
|
|
|
1
|
|
3
|
|
|
1
|
|
|
1
|
|
4
|
|
|
1
|
|
|
1
|
|
17
|
|
|
1
|
|
|
1
|
|
225
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
16
|
|
|
1
|
|
|
|
|
225
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
16
|
|
|
1
|
|
|
|
|
191
|
|
|
1
|
|
|
|
|
157
|
|
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
19
|
|
|
1
|
|
|
|
|
224
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
19
|
|
13
|
|
|
|
|
|
|
}; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
Dado qr/un objeto Digest usando el algoritmo "(\S+)"/, sub { |
16
|
|
|
|
|
|
|
my $object = Digest->new( C->matches->[0] ); |
17
|
|
|
|
|
|
|
ok( $object, "Objecto creado" ); |
18
|
|
|
|
|
|
|
S->{'object'} = $object; |
19
|
|
|
|
|
|
|
}; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
Cuando qr/he agregado "(\w+)" al objeto/, sub { |
22
|
|
|
|
|
|
|
S->{'object'}->add( C->matches->[0] ); |
23
|
|
|
|
|
|
|
}; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
Cuando "he agregado los siguientes datos al objeto", sub { |
26
|
|
|
|
|
|
|
S->{'object'}->add( C->data ); |
27
|
|
|
|
|
|
|
}; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
Entonces qr/el resultado (?:en\s*)?(\w+) es "(.+)"/, sub { |
30
|
|
|
|
|
|
|
my ( $type, $expected ) = @{ C->matches }; |
31
|
|
|
|
|
|
|
my $method = { |
32
|
|
|
|
|
|
|
'base64' => 'b64digest', |
33
|
|
|
|
|
|
|
'hexadecimal' => 'hexdigest' |
34
|
|
|
|
|
|
|
}->{$type}; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
is( S->{'object'}->$method(), $expected ); |
37
|
|
|
|
|
|
|
}; |