File: keygen.t

package info (click to toggle)
libtext-diff-perl 1.45-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 216 kB
  • sloc: perl: 1,059; makefile: 4
file content (25 lines) | stat: -rw-r--r-- 399 bytes parent folder | download | duplicates (5)
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
#!/usr/bin/perl

use strict ;
use Test ;
use Text::Diff ;

my @A = map "$_\n", qw( 1 2  3_ 4_ ) ;
my @B = map "$_\n", qw( 1 2_ 3  4_ ) ;

my @tests = (
sub {
    ok !diff \@A, \@B, {
        KEYGEN => sub {
            local $_ = shift ; 
            s/_+//g ;
            return $_ . shift ;
        },
	KEYGEN_ARGS => [ "args" ],
    } ;
},
) ;

plan tests => scalar @tests ;

$_->() for @tests ;