summaryrefslogtreecommitdiff
path: root/libcurl/tests/basic/testscript
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-01-11 23:51:49 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-01-22 18:04:37 +0300
commit23b1a0ab70f190dbbb33dabb18ec039c7d85d6b3 (patch)
treec86693607a9be05c53a44ce311d8f83638cbda03 /libcurl/tests/basic/testscript
parented9a6438ec4b50ee897ac01296034de84167f2fe (diff)
Add implementation
Diffstat (limited to 'libcurl/tests/basic/testscript')
-rw-r--r--libcurl/tests/basic/testscript27
1 files changed, 27 insertions, 0 deletions
diff --git a/libcurl/tests/basic/testscript b/libcurl/tests/basic/testscript
new file mode 100644
index 0000000..a2260f4
--- /dev/null
+++ b/libcurl/tests/basic/testscript
@@ -0,0 +1,27 @@
+# file : tests/basic/testscript
+# copyright : Copyright (c) 2016-2019 Code Synthesis Ltd
+# license : cURL License; see accompanying COPYING file
+
+: http
+:
+$* 'http://www.example.com' >>~%EOO%
+%<!doctype .*>%
+%.+
+EOO
+
+: https
+:
+: Test that an HTTPS URL is queried successfully via the system SSL backend
+: on Windows and MacOS/Clang and fails for other targets that use the OpenSSL
+: backend by default.
+:
+if ($c.target.class == 'windows' || \
+ $c.target.class == 'macos' && $c.id == 'clang-apple')
+{
+ $* 'http://www.example.com' | set s;
+ $* 'https://www.example.com' >"$s"
+}
+else
+{
+ $* 'https://www.example.com' 2>~'%failed to request .+%' != 0
+}