]> git.donarmstrong.com Git - debhelper.git/blobdiff - t/dh_link
r189: Initial revision
[debhelper.git] / t / dh_link
diff --git a/t/dh_link b/t/dh_link
new file mode 100644 (file)
index 0000000..9f644e7
--- /dev/null
+++ b/t/dh_link
@@ -0,0 +1,16 @@
+#!/usr/bin/perl
+use Test;
+plan(tests => 3);
+
+# It used to not make absolute links in this situation, and it should.
+# #37774
+system("./dh_link","etc/foo","usr/lib/bar");
+ok("/etc/foo",readlink("debian/tmp/usr/lib/bar"));
+
+# let's make sure it makes simple relative links ok.
+system("./dh_link","usr/bin/foo","usr/bin/bar");
+ok("foo",readlink("debian/tmp/usr/bin/bar"));
+
+# ok, more complex relative links.
+system("./dh_link","usr/lib/1","usr/bin/2");
+ok("../lib/1",readlink("debian/tmp/usr/bin/2"));