File: 201_example.t

package info (click to toggle)
libtest-regexp-perl 2017040101-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 220 kB
  • sloc: perl: 1,331; makefile: 2
file content (17 lines) | stat: -rwxr-xr-x 301 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/perl

use strict;
use warnings;

use Test::Regexp tests => 'no_plan';

my $checker = Test::Regexp -> new -> init (
    keep_pattern => qr /(\w+)\s+\g{-1}/,
    name         => "Double word matcher",
);

$checker -> match    ("foo foo", ["foo"]);
$checker -> no_match ("foo bar");


__END__