mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-09-22 17:54:57 +02:00
fix sldns parse tests on osx.
git-svn-id: file:///svn/unbound/trunk@3070 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
+10
-2
@@ -46,7 +46,7 @@
|
||||
#include "ldns/wire2str.h"
|
||||
|
||||
/** verbose this unit test */
|
||||
static int vbmp = 0;
|
||||
static int vbmp = 0;
|
||||
|
||||
/** print buffer to hex into string */
|
||||
static void
|
||||
@@ -113,13 +113,21 @@ static void
|
||||
rr_checks(char* wire_chk, char* txt_chk, char* txt_out, char* wire_out,
|
||||
char* back)
|
||||
{
|
||||
#ifdef __APPLE__
|
||||
/* the wiretostr on ipv6 is weird on apple, we cannot check it.
|
||||
* skip AAAA on OSX */
|
||||
if(strstr(txt_out, "IN AAAA"))
|
||||
txt_out = txt_chk; /* skip this test, but test wirefmt */
|
||||
/* so we know that txt_out back to wire is the same */
|
||||
#endif
|
||||
|
||||
if(strcmp(txt_chk, txt_out) != 0 && vbmp)
|
||||
printf("txt different\n");
|
||||
if(strcmp(wire_chk, wire_out) != 0 && vbmp)
|
||||
printf("wire1 different\n");
|
||||
if(strcmp(wire_chk, back) != 0 && vbmp)
|
||||
printf("wire2 different\n");
|
||||
|
||||
|
||||
unit_assert(strcmp(txt_chk, txt_out) == 0);
|
||||
unit_assert(strcmp(wire_chk, wire_out) == 0);
|
||||
unit_assert(strcmp(wire_chk, back) == 0);
|
||||
|
||||
Reference in New Issue
Block a user