Переглянути джерело

libdpkg: Handle libtool executables in progname unit test

Guillem Jover 11 роки тому
батько
коміт
5bcdaa5eac
2 змінених файлів з 8 додано та 1 видалено
  1. 1 0
      debian/changelog
  2. 7 1
      lib/dpkg/t/t-progname.c

+ 1 - 0
debian/changelog

@@ -110,6 +110,7 @@ dpkg (1.18.0) UNRELEASED; urgency=low
     - Fix dpkg-divert unit test to work when there is no /dev/full.
     - Skip test cases when there is no c++filt available.
     - Add test cases for Dpkg::Conf and Dpkg::Checksums.
+    - Handle libtool executables in progname unit test.
   * Build system:
     - Bump gettext version to 0.19:
       + Use --add-location=file in msgmerge and xgettext commands.

+ 7 - 1
lib/dpkg/t/t-progname.c

@@ -27,8 +27,14 @@
 static void
 test_progname(void)
 {
+	const char *progname;
+
 	/* Test initially empty progname. */
-	test_str(dpkg_get_progname(), ==, "t-progname");
+	progname = dpkg_get_progname();
+	/* Handle libtool exectuables. */
+	if (strncmp(progname, "lt-", 3) == 0)
+		progname += 3;
+	test_str(progname, ==, "t-progname");
 
 	/* Test setting a new progname. */
 	dpkg_set_progname("newname");