summaryrefslogtreecommitdiff
path: root/libcurl/tests/basic/testscript
blob: a2260f44d14619ad98c720c2bad5987b90731933 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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
}