瀏覽代碼

libdpkg: Add additional branches to informative() test-case

Guillem Jover 16 年之前
父節點
當前提交
c548891846
共有 1 個文件被更改,包括 6 次插入 和 0 次删除
  1. 6 0
      lib/dpkg/test/t-pkginfo.c

+ 6 - 0
lib/dpkg/test/t-pkginfo.c

@@ -30,9 +30,15 @@ test_pkginfo_informative(void)
 	struct pkginfo pkg;
 
 	blankpackage(&pkg);
+	test_fail(informative(&pkg, &pkg.installed));
+
 	pkg.want = want_purge;
 	test_pass(informative(&pkg, &pkg.installed));
 
+	blankpackage(&pkg);
+	pkg.installed.description = "test description";
+	test_pass(informative(&pkg, &pkg.installed));
+
 	/* FIXME: Complete. */
 }