File: Declare.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 (35 lines) | stat: -rw-r--r-- 688 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
27
28
29
30
31
32
33
34
35
package TEST::Fennec::Declare;
use strict;
use warnings;

BEGIN {
    my $ok = eval { require Fennec::Declare; 1 };
    return if $ok;

    require Test::More;
    Test::More->import( skip_all => 'Fennec::Declare not installed' );
}

use Fennec::Declare;

tests group1 {
    ok( 1, "Here" );
}

ok( 1, "there" );

describe more {
    tests deep {
        ok( 1, 'everywhere' );
    }
}

done_testing(
    sub {
        my $runner = Fennec::Runner->new();
        my $want   = 5;
        my $got    = $runner->collector->test_count;
        return if $runner->collector->ok( $got == $want, "Got expected test count" );
        $runner->collector->diag("Got:  $got\nWant: $want");
    }
);