]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
test1304: build and skip without netrc support
authorDaniel Stenberg <daniel@haxx.se>
Thu, 17 Aug 2023 12:36:05 +0000 (14:36 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 17 Aug 2023 15:17:59 +0000 (17:17 +0200)
tests/data/test1304
tests/unit/unit1304.c

index afc9aed1e9ff05489e3b14166a1f1997b065eafa..a7de1d52fe180e0aa1108b2cbb7913a07a63936b 100644 (file)
@@ -14,6 +14,7 @@ none
 </server>
 <features>
 unittest
+netrc
 </features>
  <name>
 netrc parsing unit tests
index cb7f7bb28ab837ecd372de3c82195ee0ad95c575..0288562c6f5285d7881a9a5c74ac27788b4101d2 100644 (file)
@@ -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