File: 90-gh41.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 (22 lines) | stat: -rw-r--r-- 648 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/perl -w

use strict;
use Cwd;

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

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

# FIXME system("\\\\?\\some-absolute-path") fails (returns -1 
# and $! == "No such file or directory") causing run3() to croak()
plan skip_all => "Test temporarily disabled";

plan tests => 3;

my $exe = pp_ok(-e => "print q[I'm OK]");

# run $exe with path prefixed by '\\?\' 
# cf. https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file
my ($out) = run_ok("\\\\?\\" . Cwd::abs_path($exe));
is($out, "I'm OK", qq[executable invoked with path prefixed by "\\\\?\\" ran OK]);