-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path90.output.t
32 lines (23 loc) · 827 Bytes
/
90.output.t
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
28
29
30
31
32
use Modern::Perl;
use Test::More tests => 2;
use Text::TaskPaper;
use constant SYMMETRIC_DOCUMENT => 't/50.query.taskpaper';
use constant ASYMMETRIC_DOCUMENT => 't/90.output.taskpaper';
my( $tp, $handle, $document, $output );
# test that the symmetric document is output identically to the original
{
$tp = Text::TaskPaper->new( file => SYMMETRIC_DOCUMENT );
open $handle, '<', SYMMETRIC_DOCUMENT;
$document = do { local $/; <$handle>; };
$output = $tp->output();
ok( $document eq $output )
or print "Symmetric:\n$output";
}
# test that the asymmetric document is output identically to the reference
# symmetric document
{
$tp = Text::TaskPaper->new( file => ASYMMETRIC_DOCUMENT );
$output = $tp->output();
ok( $document eq $output )
or print "Asymmetric:\n$output";
}