~ubuntu-branches/ubuntu/hardy/clamav/hardy-backports

« back to all changes in this revision

Viewing changes to unit_tests/check_matchers.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Meskes, Stephen Gran, Michael Meskes, Michael Tautschnig
  • Date: 2008-11-29 12:15:34 UTC
  • mfrom: (1.1.1 upstream)
  • mto: (4.1.3 sid) (0.5.4 karmic)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20081129121534-8sbpoy6kr01ox2eo
[ Stephen Gran ]
* New upstream version

[ Michael Meskes ]
* Removed unused debconf templates and unfuzzied all translations.

[ Michael Tautschnig ]
* Removed --unzip from clampipe script (closes: #506055)
* Moved clamav-milter specific stuff from its specific README.Debian to
  clamav-global one.
* Sync start of clamav-milter with clamav-daemon when clamav-daemon is being
  upgraded (closes: #309067)
* The TemporaryDirectory option has been added long ago, no need for hacks
  via clamav-daemon.default anymore (closes: #253080)

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#include "clamav-config.h"
22
22
#endif
23
23
 
24
 
#ifdef HAVE_CHECK
25
 
 
26
24
#include <check.h>
27
25
#include <stdio.h>
28
26
#include <string.h>
79
77
 
80
78
    for(i = 0; ac_testdata[i].data; i++) {
81
79
        ret = cli_ac_scanbuff(ac_testdata[i].data, strlen(ac_testdata[i].data), &virname, NULL, NULL, root, &mdata, 0, 0, -1, NULL, AC_SCAN_VIR, NULL);
82
 
        fail_unless(ret == CL_VIRUS, "cli_ac_scanbuff() failed for %s", ac_testdata[i].virname);
83
 
        fail_unless(!strncmp(virname, ac_testdata[i].virname, strlen(ac_testdata[i].virname)), "Dataset %u matched with %s", i, virname);
 
80
        fail_unless_fmt(ret == CL_VIRUS, "cli_ac_scanbuff() failed for %s", ac_testdata[i].virname);
 
81
        fail_unless_fmt(!strncmp(virname, ac_testdata[i].virname, strlen(ac_testdata[i].virname)), "Dataset %u matched with %s", i, virname);
84
82
    }
85
83
 
86
84
    cli_ac_freedata(&mdata);
127
125
    return s;
128
126
}
129
127
 
130
 
#endif