]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
unit3200: skip testing if function is not present
authorDaniel Stenberg <daniel@haxx.se>
Thu, 17 Aug 2023 12:43:37 +0000 (14:43 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 17 Aug 2023 15:17:59 +0000 (17:17 +0200)
Fake a successful run since we have no easy mechanism to skip this test
for this advanced condition.

tests/unit/unit3200.c

index 2d684cf82dabe0fb4f94c6df3c48c401738393bf..eff56677208222023c5fd12a5950f8c9ef99ac42 100644 (file)
@@ -24,6 +24,9 @@
 #include "curlcheck.h"
 #include "curl_get_line.h"
 
+#if !defined(CURL_DISABLE_COOKIES) || !defined(CURL_DISABLE_ALTSVC) ||  \
+  !defined(CURL_DISABLE_HSTS) || !defined(CURL_DISABLE_NETRC)
+
 /* The test XML does not supply a way to write files without newlines
  * so we write our own
  */
@@ -157,3 +160,16 @@ UNITTEST_START
     fprintf(stderr, "OK\n");
   }
 UNITTEST_STOP
+
+#else
+static CURLcode unit_setup(void)
+{
+  return CURLE_OK;
+}
+static void unit_stop(void)
+{
+}
+UNITTEST_START
+UNITTEST_STOP
+
+#endif