Skip to content

Commit

Permalink
vcard_test.c - compile without NDEBUG so assert isn't a no-op.
Browse files Browse the repository at this point in the history
  • Loading branch information
winterz authored and ksmurchison committed Apr 27, 2024
1 parent e4eb8d7 commit 7eb6d69
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/test/libicalvcard/vcard_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
#include <config.h>
#endif

#if defined(NDEBUG)
#undef NDEBUG
#endif

#include "vcard.h"

#include <assert.h>
Expand Down Expand Up @@ -59,6 +63,7 @@ static void test_parse_file(const char *fname)
size_t filesize;
void *data = NULL;
vcardcomponent *card;
//krazy:cond=insecurenet
const char *want =
"BEGIN:VCARD\r\n"
"VERSION:4.0\r\n"
Expand Down Expand Up @@ -92,7 +97,7 @@ static void test_parse_file(const char *fname)
"X-LIC-ERROR;X-LIC-ERRORTYPE=RESTRICTION-CHECK:Failed restrictions for \r\n"
" VERSION property. Expected 1 instances of the property and got 0\r\n"
"END:VCARD\r\n";

//krazy:endcond=insecurenet
fp = fopen(fname, "rb"); //on Windows, must open in binary mode
if (fp == (FILE *)NULL) {
fprintf(stderr, "Error: unable to open %s\n", fname);
Expand Down

0 comments on commit 7eb6d69

Please sign in to comment.