]> git.ipfire.org Git - thirdparty/make.git/commitdiff
* tests/scripts/features/archives: [SV 54395] Test long archive names.
authorPaul Smith <psmith@gnu.org>
Sat, 4 Aug 2018 19:47:15 +0000 (15:47 -0400)
committerPaul Smith <psmith@gnu.org>
Sat, 4 Aug 2018 21:02:25 +0000 (17:02 -0400)
tests/scripts/features/archives

index 111a1ffb90a85130ae53bf8959c3ecc2b024deb7..5662de42c39cc165f444a45bd3f2edbc5e1a08e5 100644 (file)
@@ -213,5 +213,28 @@ if ($osname eq 'VMS') {
   remove_directory_tree('artest');
 }
 
+# Check long names for archive members.
+# See Savannah bug #54395
+
+if ($osname ne 'VMS') {
+    my $pre = '1234567890123456';
+    my $lib = 'foo.a';
+
+    run_make_test(qq!
+# Both member names > 16 characters long
+default: $lib(${pre}a) $lib(${pre}b)
+
+(%): % ; \$(AR) \$(ARFLAGS) \$@ \$%
+
+$pre%: ; touch \$\@
+!,
+                  $arvar, "touch ${pre}a\n$ar $arflags $lib ${pre}a\n$ar: creating $lib\na - ${pre}a\ntouch ${pre}b\n$ar $arflags $lib ${pre}b\na - ${pre}b\nrm ${pre}a ${pre}b\n");
+
+    # Run it again; nothing should happen
+    run_make_test(undef, $arvar, "#MAKE#: Nothing to be done for 'default'.\n");
+
+    unlink($lib);
+}
+
 # This tells the test driver that the perl test script executed properly.
 1;