File: dupe.t

package info (click to toggle)
libtest-routine-perl 0.031-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 296 kB
  • sloc: perl: 705; makefile: 2
file content (27 lines) | stat: -rw-r--r-- 417 bytes parent folder | download | duplicates (2)
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
use strict;
use warnings;

use Test::More;
use Test::Fatal;

use lib 't/lib';

{
  my $err = exception { require NoGood };
  like(
    $err,
    qr/with the same name/,
    "having two tests with the same name is disallowed",
  );
}

{
  my $err = exception { require NoGood2 };
  like(
    $err,
    qr/there's already a subroutine named/,
    "a test/subroutine name mismatch is not allowed",
  );
}

done_testing;