From: Daniel Stenberg Date: Thu, 17 Aug 2023 12:36:05 +0000 (+0200) Subject: test1304: build and skip without netrc support X-Git-Tag: curl-8_3_0~143 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=97a79c79a79fbdf95fef783f41769e913bf8b53f;p=thirdparty%2Fcurl.git test1304: build and skip without netrc support --- diff --git a/tests/data/test1304 b/tests/data/test1304 index afc9aed1e9..a7de1d52fe 100644 --- a/tests/data/test1304 +++ b/tests/data/test1304 @@ -14,6 +14,7 @@ none unittest +netrc netrc parsing unit tests diff --git a/tests/unit/unit1304.c b/tests/unit/unit1304.c index cb7f7bb28a..0288562c6f 100644 --- a/tests/unit/unit1304.c +++ b/tests/unit/unit1304.c @@ -25,6 +25,8 @@ #include "netrc.h" #include "memdebug.h" /* LAST include file */ +#ifndef CURL_DISABLE_NETRC + static char *login; static char *password; @@ -181,3 +183,16 @@ UNITTEST_START fail_unless(strncmp(login, "none", 4) == 0, "login should be 'none'"); UNITTEST_STOP + +#else +static CURLcode unit_setup(void) +{ + return CURLE_OK; +} +static void unit_stop(void) +{ +} +UNITTEST_START +UNITTEST_STOP + +#endif