summaryrefslogtreecommitdiff
path: root/libca-certificates-curl/tests/basics
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-01-18 22:19:54 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-01-22 15:46:09 +0300
commit004bb71d88ed54eb4d540d14491bf86256a952fd (patch)
treeb381d80f22682e29651370701d798a2e3dfebccc /libca-certificates-curl/tests/basics
parent66e25bf08b493258642cb844b987fd96afa39c7b (diff)
Add implementation
Diffstat (limited to 'libca-certificates-curl/tests/basics')
-rw-r--r--libca-certificates-curl/tests/basics/buildfile7
-rw-r--r--libca-certificates-curl/tests/basics/driver.c19
-rw-r--r--libca-certificates-curl/tests/basics/testscript17
3 files changed, 43 insertions, 0 deletions
diff --git a/libca-certificates-curl/tests/basics/buildfile b/libca-certificates-curl/tests/basics/buildfile
new file mode 100644
index 0000000..3adb0ff
--- /dev/null
+++ b/libca-certificates-curl/tests/basics/buildfile
@@ -0,0 +1,7 @@
+# file : tests/basic/buildfile
+# copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
+# license : Mozilla Public License 2.0; see accompanying LICENSE file
+
+import libs = libca-certificates-curl%lib{ca-certificates-curl}
+
+exe{driver}: {h c}{**} $libs testscript
diff --git a/libca-certificates-curl/tests/basics/driver.c b/libca-certificates-curl/tests/basics/driver.c
new file mode 100644
index 0000000..f52b3d8
--- /dev/null
+++ b/libca-certificates-curl/tests/basics/driver.c
@@ -0,0 +1,19 @@
+/* file : tests/basic/driver.c
+ * copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
+ * license : Mozilla Public License 2.0; see accompanying LICENSE file
+ */
+#include <stdio.h>
+
+#include <libca-certificates-curl/path.h>
+#include <libca-certificates-curl/version.h>
+
+/* Usage: argv[0]
+ *
+ * Print the CA certificates file path to stdout.
+ */
+int
+main ()
+{
+ printf ("%s\n", ca_certificates_file ());
+ return 0;
+}
diff --git a/libca-certificates-curl/tests/basics/testscript b/libca-certificates-curl/tests/basics/testscript
new file mode 100644
index 0000000..ffa60ad
--- /dev/null
+++ b/libca-certificates-curl/tests/basics/testscript
@@ -0,0 +1,17 @@
+# file : tests/basic/testscript
+# copyright : Copyright (c) 2016-2019 Code Synthesis Ltd
+# license : Mozilla Public License 2.0; see accompanying LICENSE file
+
+: basic
+:
+{
+ $* | set f;
+
+ cat "$f" >>~%EOO%
+ %.*
+ -----BEGIN CERTIFICATE-----
+ %.+
+ -----END CERTIFICATE-----
+ %*
+ EOO
+}