]> granicus.if.org Git - curl/commitdiff
unit1307: just fail without FTP support
authorMarcel Raad <Marcel.Raad@teamviewer.com>
Thu, 14 Feb 2019 08:35:54 +0000 (09:35 +0100)
committerMarcel Raad <Marcel.Raad@teamviewer.com>
Fri, 15 Feb 2019 08:50:52 +0000 (09:50 +0100)
I missed to check this in with commit
71786c0505926aaf7e9b2477b2fb7ee16a915ec6, which only disabled the test.
This fixes the actual linker error.

Closes https://github.com/curl/curl/pull/3568

tests/unit/unit1307.c

index d6664ff696427aba91cc40247a96db40732811e0..91e4606b716b5fd4098fc911116cb95933fb0b06 100644 (file)
 
 #include "curl_fnmatch.h"
 
+static CURLcode unit_setup(void)
+{
+  return CURLE_OK;
+}
+
+static void unit_stop(void)
+{
+}
+
+#ifndef CURL_DISABLE_FTP
+
 /*
    CURL_FNMATCH_MATCH    0
    CURL_FNMATCH_NOMATCH  1
@@ -239,15 +250,6 @@ static const struct testcase tests[] = {
                                 "a",                      NOMATCH|LINUX_FAIL}
 };
 
-static CURLcode unit_setup(void)
-{
-  return CURLE_OK;
-}
-
-static void unit_stop(void)
-{
-}
-
 static const char *ret2name(int i)
 {
   switch(i) {
@@ -308,3 +310,14 @@ UNITTEST_START
   }
 }
 UNITTEST_STOP
+
+#else
+
+UNITTEST_START
+{
+  /* nothing to do, just fail */
+  return 1;
+}
+UNITTEST_STOP
+
+#endif