1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-22 15:58:50 -05:00

Add 4 new pactests to get better code coverage by pactest

I started playing around with gcov today and it showed a few places in the
code that we don't test at all. This is the start of ensuring that we
execute most of the code in our codebase.

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2007-12-02 17:24:22 -06:00
parent 32e625db14
commit 7341d09541
6 changed files with 22 additions and 2 deletions

View File

@ -428,7 +428,7 @@ static int extract_single_file(struct archive *archive,
} }
} }
} }
/* else if(S_ISLNK(entrymode)) { */ /* else if(S_ISLNK(entrymode)) */
/* case 5,8: don't need to do anything special */ /* case 5,8: don't need to do anything special */
} }

View File

@ -593,7 +593,7 @@ int _alpm_resolvedeps(pmdb_t *local, alpm_list_t *dbs_sync, pmpkg_t *syncpkg,
missdepstring, miss->target); missdepstring, miss->target);
free(missdepstring); free(missdepstring);
if(data) { if(data) {
MALLOC(miss, sizeof(pmdepmissing_t), 0); MALLOC(miss, sizeof(pmdepmissing_t),/*nothing*/);
if(!miss) { if(!miss) {
pm_errno = PM_ERR_MEMORY; pm_errno = PM_ERR_MEMORY;
FREELIST(*data); FREELIST(*data);

View File

@ -0,0 +1,5 @@
self.description = "Test command line option (--version)"
self.args = "--version"
self.addrule("PACMAN_RETCODE=2")

View File

@ -0,0 +1,5 @@
self.description = "Test command line option (--help)"
self.args = "--help"
self.addrule("PACMAN_RETCODE=2")

View File

@ -0,0 +1,5 @@
self.description = "Test command line option (-S --help)"
self.args = "-S --help"
self.addrule("PACMAN_RETCODE=2")

View File

@ -0,0 +1,5 @@
self.description = "Test command line option (-v)"
self.args = "-v"
self.addrule("PACMAN_RETCODE=1")