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 committed Apr 27, 2024
1 parent 03441bf commit ef50d1f
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;
char *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 ef50d1f

Please sign in to comment.