lib1301: unit103 turned into a libtest
It is not a unit test so moved over to libtests.
diff --git a/tests/data/test1301 b/tests/data/test1301
index 5aea24b..1756061 100644
--- a/tests/data/test1301
+++ b/tests/data/test1301
@@ -2,7 +2,7 @@
<info>
<keywords>
unittest
-curl_strcasecompare
+curl_strequal
</keywords>
</info>
@@ -12,11 +12,8 @@
<server>
none
</server>
-<features>
-unittest
-</features>
<name>
-curl_strcasecompare unit tests
+curl_strequal tests
</name>
</client>
</testcase>
diff --git a/tests/libtest/Makefile.inc b/tests/libtest/Makefile.inc
index 484ac17..861d79d 100644
--- a/tests/libtest/Makefile.inc
+++ b/tests/libtest/Makefile.inc
@@ -52,6 +52,7 @@
lib659 lib661 lib666 lib667 lib668 \
lib670 lib671 lib672 lib673 lib674 lib676 lib677 lib678 \
lib1156 \
+ lib1301 \
lib1500 lib1501 lib1502 lib1503 lib1504 lib1505 lib1506 lib1507 lib1508 \
lib1509 lib1510 lib1511 lib1512 lib1513 lib1514 lib1515 lib1517 \
lib1518 lib1520 lib1521 lib1522 lib1523 \
@@ -427,6 +428,10 @@
lib678_LDADD = $(TESTUTIL_LIBS)
lib678_CPPFLAGS = $(AM_CPPFLAGS)
+lib1301_SOURCES = lib1301.c $(SUPPORTFILES) $(TESTUTIL)
+lib1301_LDADD = $(TESTUTIL_LIBS)
+lib1301_CPPFLAGS = $(AM_CPPFLAGS)
+
lib1500_SOURCES = lib1500.c $(SUPPORTFILES) $(TESTUTIL)
lib1500_LDADD = $(TESTUTIL_LIBS)
lib1500_CPPFLAGS = $(AM_CPPFLAGS)
diff --git a/tests/libtest/lib1301.c b/tests/libtest/lib1301.c
new file mode 100644
index 0000000..d98134c
--- /dev/null
+++ b/tests/libtest/lib1301.c
@@ -0,0 +1,62 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+#include "test.h"
+
+#define fail_unless(expr, msg) \
+ do { \
+ if(!(expr)) { \
+ fprintf(stderr, "%s:%d Assertion '%s' failed: %s\n", \
+ __FILE__, __LINE__, #expr, msg); \
+ return 1; \
+ } \
+ } while(0)
+
+int test(char *URL)
+{
+ int rc;
+ (void)URL;
+
+ rc = curl_strequal("iii", "III");
+ fail_unless(rc != 0, "return code should be non-zero");
+
+ rc = curl_strequal("iiia", "III");
+ fail_unless(rc == 0, "return code should be zero");
+
+ rc = curl_strequal("iii", "IIIa");
+ fail_unless(rc == 0, "return code should be zero");
+
+ rc = curl_strequal("iiiA", "IIIa");
+ fail_unless(rc != 0, "return code should be non-zero");
+
+ rc = curl_strnequal("iii", "III", 3);
+ fail_unless(rc != 0, "return code should be non-zero");
+
+ rc = curl_strnequal("iiiABC", "IIIcba", 3);
+ fail_unless(rc != 0, "return code should be non-zero");
+
+ rc = curl_strnequal("ii", "II", 3);
+ fail_unless(rc != 0, "return code should be non-zero");
+
+ return 0;
+}
diff --git a/tests/unit/Makefile.inc b/tests/unit/Makefile.inc
index 831a820..c38bc95 100644
--- a/tests/unit/Makefile.inc
+++ b/tests/unit/Makefile.inc
@@ -29,7 +29,7 @@
../libtest/first.c
# These are all unit test programs
-UNITPROGS = unit1300 unit1301 unit1302 unit1303 unit1304 unit1305 unit1307 \
+UNITPROGS = unit1300 unit1302 unit1303 unit1304 unit1305 unit1307 \
unit1308 unit1309 unit1323 \
unit1330 unit1394 unit1395 unit1396 unit1397 unit1398 \
unit1399 \
@@ -42,9 +42,6 @@
unit1300_SOURCES = unit1300.c $(UNITFILES)
unit1300_CPPFLAGS = $(AM_CPPFLAGS)
-unit1301_SOURCES = unit1301.c $(UNITFILES)
-unit1301_CPPFLAGS = $(AM_CPPFLAGS)
-
unit1302_SOURCES = unit1302.c $(UNITFILES)
unit1302_CPPFLAGS = $(AM_CPPFLAGS)
diff --git a/tests/unit/unit1301.c b/tests/unit/unit1301.c
deleted file mode 100644
index 17b2700..0000000
--- a/tests/unit/unit1301.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
- *
- * This software is licensed as described in the file COPYING, which
- * you should have received as part of this distribution. The terms
- * are also available at https://curl.se/docs/copyright.html.
- *
- * You may opt to use, copy, modify, merge, publish, distribute and/or sell
- * copies of the Software, and permit persons to whom the Software is
- * furnished to do so, under the terms of the COPYING file.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- * SPDX-License-Identifier: curl
- *
- ***************************************************************************/
-#include "curlcheck.h"
-
-#include "strcase.h"
-
-static CURLcode unit_setup(void) {return CURLE_OK;}
-static void unit_stop(void) {}
-
-UNITTEST_START
-
-int rc;
-
-rc = curl_strequal("iii", "III");
-fail_unless(rc != 0, "return code should be non-zero");
-
-rc = curl_strequal("iiia", "III");
-fail_unless(rc == 0, "return code should be zero");
-
-rc = curl_strequal("iii", "IIIa");
-fail_unless(rc == 0, "return code should be zero");
-
-rc = curl_strequal("iiiA", "IIIa");
-fail_unless(rc != 0, "return code should be non-zero");
-
-rc = curl_strnequal("iii", "III", 3);
-fail_unless(rc != 0, "return code should be non-zero");
-
-rc = curl_strnequal("iiiABC", "IIIcba", 3);
-fail_unless(rc != 0, "return code should be non-zero");
-
-rc = curl_strnequal("ii", "II", 3);
-fail_unless(rc != 0, "return code should be non-zero");
-
-UNITTEST_STOP