File: test.t

package info (click to toggle)
libtest-differences-perl 0.72-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 192 kB
  • sloc: perl: 498; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 635 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
#!perl

use strict;
use warnings;
use Test::More;
use Test::Differences;

my @tests = (
    sub { eq_or_diff "a",               "b" },
    sub { eq_or_diff "a\nb\nc\n",       "a\nc\n" },
    sub { eq_or_diff "a\nb\nc\n",       "a\nB\nc\n" },
    sub { eq_or_diff "a\nb\nc\nd\ne\n", "a\nc\ne\n" },
    sub { eq_or_diff "a\nb\nc\nd\ne\n", "a\nb\nd\ne\n", { context => 0 } },
    sub { eq_or_diff "a\nb\nc\nd\ne\n", "a\nb\nd\ne\n", { context => 10 } },
);

plan tests => scalar @tests;
diag "This test misuses TODO: these TODOs are actually real tests.\n";

TODO: {
    local $TODO = 'Deliberate misuse of TODO';
    $_->() for @tests;
}