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 33 34 35 36 37 38 39 40 41 42 43
|
#!/usr/bin/perl
use strict;
use Test::More;
use Dpkg::IPC;
my $out;
chdir 't/simple';
spawn(
exec => [qw(apt-file update)],
nocheck => 1,
wait_child => 1,
error_to_string => \$out,
);
if ($?) {
diag "apt-file update failed";
}
spawn(
exec => ['pkgjs-install'],
nocheck => 1,
wait_child => 1,
to_string => \$out,
);
if ($?) {
fail "pkgjs-install failed";
}
ok( -d 'node_modules', 'node_modules created' );
ok( -l 'node_modules/chalk', 'chalk linked' );
ok( readlink('node_modules/chalk') eq '/usr/share/nodejs/chalk',
'good chalk link' );
ok( -d 'node_modules/@mdn', 'node_modules/@mdn created' );
ok(
-l 'node_modules/@mdn/browser-compat-data',
'@mdn/browser-compat-data linked'
);
ok(
readlink('node_modules/@mdn/browser-compat-data') eq
'/usr/share/nodejs/@mdn/browser-compat-data',
'good @mdn/browser-compat-data link'
);
done_testing();
|