File: before_case.t

package info (click to toggle)
libfennec-perl 2.018-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 384 kB
  • sloc: perl: 2,083; makefile: 2
file content (26 lines) | stat: -rw-r--r-- 435 bytes parent folder | download | duplicates (4)
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
#!/usr/bin/perl
use strict;
use warnings;

use Fennec;

describe set => sub {
    my $name = "";

    before_case init_name => sub {
        $name .= "Foo";
    };

    case bar => sub { $name .= "Bar" };
    case baz => sub { $name .= "Baz" };

    after_case finish_name => sub {
        $name .= "End";
    };

    tests them => sub {
        like( $name, qr/^Foo(Bar|Baz)End$/, "Parts in correct order" );
    };
};

done_testing;