summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorNiels Thykier <niels@thykier.net>2017-06-28 12:17:42 +0000
committerNiels Thykier <niels@thykier.net>2017-06-28 12:17:42 +0000
commitb7da6ea323aae5bdd2a89c7ab4d3356ad938f683 (patch)
treefb0a6b24ca5484f45eb0891e064e98585630f267 /t
parent78ae00875157b0b0f010f18c97a4f6da4ae131df (diff)
dh_installdocs: Do less under nodoc profile
Signed-off-by: Niels Thykier <niels@thykier.net>
Diffstat (limited to 't')
-rwxr-xr-xt/dh_installdocs/dh_installdocs.t21
1 files changed, 20 insertions, 1 deletions
diff --git a/t/dh_installdocs/dh_installdocs.t b/t/dh_installdocs/dh_installdocs.t
index 2c7b381a..ee7e546f 100755
--- a/t/dh_installdocs/dh_installdocs.t
+++ b/t/dh_installdocs/dh_installdocs.t
@@ -22,9 +22,13 @@ if (not defined($rootcmd)) {
plan skip_all => 'fakeroot required';
}
else {
- plan(tests => 17);
+ plan(tests => 22);
}
+# Drop DEB_BUILD_PROFILES and DEB_BUILD_OPTIONS so they don't interfere
+delete($ENV{DEB_BUILD_PROFILES});
+delete($ENV{DEB_BUILD_OPTIONS});
+
system("rm -rf debian/foo debian/bar debian/baz");
my $doc = "debian/docfile";
@@ -69,6 +73,21 @@ ok(readlink("debian/foo/usr/share/doc/foo") eq 'bar');
ok(-e "debian/foo/usr/share/doc/bar/docfile");
system("rm -rf debian/foo debian/bar debian/baz");
+# ... and with nodoc
+
+# docs are ignored, but copyright file is still there
+system("DEB_BUILD_PROFILES=nodoc $rootcmd $TOPDIR/dh_installdocs -pbar $doc");
+ok(!-e "debian/bar/usr/share/doc/bar/docfile");
+ok(!-e "debian/bar/usr/share/doc/bar/copyright");
+system("rm -rf debian/foo debian/bar debian/baz");
+
+# docs are ignored, but symlinked doc dir is still there
+system("DEB_BUILD_PROFILES=nodoc DH_COMPAT=11 $rootcmd $TOPDIR/dh_installdocs -pfoo --link-doc=bar $doc");
+ok(-l "debian/foo/usr/share/doc/foo");
+ok(readlink("debian/foo/usr/share/doc/foo") eq 'bar');
+ok(!-e "debian/foo/usr/share/doc/bar/docfile");
+system("rm -rf debian/foo debian/bar debian/baz");
+
system("$TOPDIR/dh_clean");
# Local Variables: