summaryrefslogtreecommitdiff
path: root/t/924903.t
diff options
context:
space:
mode:
Diffstat (limited to 't/924903.t')
-rw-r--r--t/924903.t31
1 files changed, 31 insertions, 0 deletions
diff --git a/t/924903.t b/t/924903.t
new file mode 100644
index 0000000..92ca4b0
--- /dev/null
+++ b/t/924903.t
@@ -0,0 +1,31 @@
1#!/usr/bin/perl
2use strict;
3use warnings;
4use Test::More tests => 3;
5use File::Path qw(remove_tree);
6use File::Copy::Recursive qw(dircopy);
7use File::stat;
8
9sub prepare_source_package {
10 die '$0 does not match expected format'
11 unless ($0 =~ m#t/([0-9]+)\.t#);
12 my $number = $1;
13 my $srcdir = (-d "t/base/${number}") ? "t/base/${number}" : "t/base/default";
14 my $testdir = "t/${number}";
15 dircopy($srcdir, $testdir);
16 chdir($testdir);
17 return $testdir;
18}
19
20sub system_ok {
21 ok(system(@_) == 0, "external command @_");
22}
23
24prepare_source_package();
25
26system_ok('dh_runit', 'debian/test.runscript', 'name=test');
27my $path = 'debian/dh-runit-test/var/lib/runit/supervise/test';
28ok(-d $path, 'supervise directory correctly created');
29my $info = stat($path);
30my $mode = sprintf("%o", $info->mode & 0777);
31is($mode, '700', 'supervise directory have conservative permissions');