File: 90-rt127064.t

package info (click to toggle)
libpar-packer-perl 1.064-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,388 kB
  • sloc: perl: 12,774; ansic: 1,474; makefile: 30; sh: 5
file content (24 lines) | stat: -rw-r--r-- 676 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
21
22
23
24
#!/usr/bin/perl -w

use strict;
use File::Spec::Functions;
use Data::Dumper;

use Test::More;
require "./t/utils.pl";

plan skip_all => "Tests only relevant on Windows" unless $^O eq 'MSWin32';
plan tests => 3;

my $exe = pp_ok(-e => 'use Data::Dumper; print Data::Dumper->new([\@ARGV])->Indent(1)->Useqq(1)->Dump');

# NOTE: pp_ok() sets $ENV{PAR_TMPDIR} as a side effect
$ENV{PAR_TMPDIR} = catdir($ENV{PAR_TMPDIR}, "t m p");   # path containing blanks
mkdir($ENV{PAR_TMPDIR}, 0755);

diag("running $exe with PAR_TMPDIR=$ENV{PAR_TMPDIR} ...");
my @argv = qw(foo bar quux);
my ($out) = run_ok($exe, @argv);
is( $out, Data::Dumper->new([\@argv])->Indent(1)->Useqq(1)->Dump);