~ubuntu-branches/debian/sid/libpandoc-wrapper-perl/sid

« back to all changes in this revision

Viewing changes to t/file-objects.t

  • Committer: Package Import Robot
  • Author(s): Jonas Smedegaard
  • Date: 2017-03-29 18:16:34 UTC
  • Revision ID: package-import@ubuntu.com-20170329181634-oyx1tvs2gyoe6210
Tags: upstream-0.6.0
ImportĀ upstreamĀ versionĀ 0.6.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
use strict;
 
2
use Test::More;
 
3
use Test::Exception;
 
4
use Pandoc;
 
5
 
 
6
use subs qw(path tempdir);
 
7
 
 
8
plan skip_all => 'pandoc executable required' unless pandoc;
 
9
plan skip_all => 'Path::Tiny required'
 
10
    unless eval 'use Path::Tiny qw(path tempdir); 1;';
 
11
 
 
12
my $dir = tempdir( CLEANUP => 1 );
 
13
 
 
14
(my $input = $dir->child('input.md'))->spew_utf8(<<'DUMMY_TEXT');
 
15
## Eius Ut
 
16
 
 
17
Qui aut voluptate minima.
 
18
DUMMY_TEXT
 
19
note $input->slurp_utf8;
 
20
 
 
21
my $output = $dir->child('output.html');
 
22
 
 
23
lives_ok { pandoc->run(-o => $output, $input) } 'call pandoc with file objects as arguments';
 
24
note $output->slurp_utf8;
 
25
 
 
26
done_testing;