[debhelper-devel] [debhelper] 03/03: Add test case for #866570

Niels Thykier nthykier at moszumanska.debian.org
Fri Jun 30 18:44:41 UTC 2017


This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch expand-test-suite
in repository debhelper.

commit 806cbfe07802fc27d5a69bcb7d3647db63e1e00a
Author: Niels Thykier <niels at thykier.net>
Date:   Fri Jun 30 18:44:06 2017 +0000

    Add test case for #866570
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 t/dh_install.t | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/t/dh_install.t b/t/dh_install.t
index 48b153c..ccc5730 100755
--- a/t/dh_install.t
+++ b/t/dh_install.t
@@ -7,7 +7,7 @@ use File::Basename qw(dirname);
 use lib dirname(__FILE__);
 use Test::DH;
 
-plan(tests => 12);
+plan(tests => 13);
 
 system("rm -rf debian/debhelper debian/tmp");
 
@@ -130,6 +130,16 @@ each_compat_subtest {
     system("rm -rf debian/debhelper bar");
 };
 
+each_compat_subtest {
+    my ($compat) = @_;
+    # #866570 - leading slashes must *not* pull things from the root FS.
+    system("mkdir -p bin; touch bin/grep-i-licious");
+    system("DH_COMPAT=${compat} dh_install '/bin/grep*' 2>/dev/null");
+    ok(-e "debian/debhelper/bin/grep-i-licious", "#866570 [${compat}]");
+    ok(!-e "debian/debhelper/bin/grep", "#866570 [${compat}]");
+    system("rm -rf debian/debhelper bin");
+};
+
 # Local Variables:
 # indent-tabs-mode: t
 # tab-width: 4

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git




More information about the debhelper-devel mailing list