File: test.t

package info (click to toggle)
libtest-differences-perl 0.61-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 144 kB
  • sloc: perl: 300; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 602 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
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;
}