File: dh_simple.t

package info (click to toggle)
pkg-js-tools 0.17.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,036 kB
  • sloc: perl: 5,006; sh: 840; makefile: 36; javascript: 22
file content (45 lines) | stat: -rw-r--r-- 1,293 bytes parent folder | download | duplicates (2)
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
44
45
use Test::More tests => 14;
use Dpkg::IPC;

my $pwd = `pwd`;
chdir "t/simple";
spawn( exec => [ 'dh', 'build', '--with', 'nodejs' ], wait_child => 1 );
foreach (qw(a b)) {
    ok( -f $_, "build creates $_" );
    unlink $_;
}
spawn( exec => [ 'dh_auto_test', '--buildsystem=nodejs' ], wait_child => 1 );
ok( -e 'foo', 'File "foo" created' ) or diag `ls -l`;
unlink('foo');
spawn(
    exec       => [ 'dh_auto_install', '--buildsystem=nodejs' ],
    wait_child => 1
);
foreach (
    qw(
    debian/foo/usr/share/nodejs/foo/package.json
    debian/foo/usr/share/nodejs/foo/index.js
    )
  )
{
    ok( -f $_, "$_ installed" );
}
foreach (
    qw(
    debian/foo/usr/share/nodejs/foo/Changelog.txt
    debian/foo/usr/share/nodejs/foo/copying
    debian/foo/usr/share/nodejs/foo/LICENSE
    debian/foo/usr/share/nodejs/foo/README.md
    debian/foo/usr/share/nodejs/foo/.prettierrc.js
    debian/foo/usr/share/nodejs/foo/babel.config.js
    debian/foo/usr/share/nodejs/foo/dontinstall.js
    debian/foo/usr/share/nodejs/foo/bad1.js
    debian/foo/usr/share/nodejs/foo/bad3.js
    )
  )
{
    ok( !-f $_, "$_ not installed" );
}
spawn( exec => [ 'dh_auto_clean', '--buildsystem=nodejs' ], wait_child => 1 );
spawn( exec => ['dh_clean'],                                wait_child => 1 );
chdir $pwd;