File: 34commandlinemarkdown.t

package info (click to toggle)
libtext-markdown-perl 1.000031-5
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,988 kB
  • sloc: perl: 2,164; makefile: 9
file content (18 lines) | stat: -rw-r--r-- 587 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use strict;
use warnings;
use FindBin qw($Bin);
use Test::More tests => 2;
use Test::Exception;

my $filename = "$Bin/Markdown-from-MDTest1.1.mdtest/Markdown_Documentation_-_Syntax";
unshift(@ARGV, "$filename.text");
open my $file, '<', "$filename.xhtml" or die "Couldn't open $filename: $!";
my $expected = do { local $/; <$file> };

my $script = $ENV{AUTOPKGTEST_TMP} ? '/usr/bin/markdown' : "$Bin/../script/Markdown.pl";

lives_ok {
    require "$script";
} 'require Markdown.pl works';
my $out = main();
is($out, $expected, 'Markdown.pl does the right thing with the syntax guide');