diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2024-02-23 18:50:28 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2024-02-26 16:38:49 +0300 |
commit | a1ea72d719b63a4d2b6421ce2e53b7e3ab12a8a1 (patch) | |
tree | 8c5e9e1c044586cee0cc16dd66e78f70b4d33c3f /tests/curl | |
parent | 14049ee7c5880b9e33a3e295d19ed6b36edab567 (diff) |
Add curl constructors which allow to adjust curl command line
Diffstat (limited to 'tests/curl')
-rw-r--r-- | tests/curl/driver.cxx | 13 | ||||
-rw-r--r-- | tests/curl/testscript | 10 |
2 files changed, 19 insertions, 4 deletions
diff --git a/tests/curl/driver.cxx b/tests/curl/driver.cxx index 4cf1815..bd12c29 100644 --- a/tests/curl/driver.cxx +++ b/tests/curl/driver.cxx @@ -105,6 +105,19 @@ http () assert (!c.wait ()); } + // POST from stream without --fail. + // + { + curl c (p, path ("-"), nullfd, 2, + curl::post, + curl::flags::no_fail, + u + "/bogus"); + + c.out << "bogus" << endl; + c.out.close (); + assert (c.wait ()); + } + // POST from /dev/null. // { diff --git a/tests/curl/testscript b/tests/curl/testscript index d26a39c..5818d1a 100644 --- a/tests/curl/testscript +++ b/tests/curl/testscript @@ -45,15 +45,17 @@ sudo /usr/sbin/in.tftpd \ { $* 'http' 2>>~%EOE% - curl -s -S --fail --location https://build2.org/bogus + curl -sS --fail --location https://build2.org/bogus %curl: \(22\) The requested URL returned error: 404( Not Found)?% - curl -s -S --fail --location https://build2.org + curl -sS --fail --location https://build2.org - curl -s -S --fail --location --data-binary @- https://build2.org/bogus + curl -sS --fail --location --data-binary @- https://build2.org/bogus %curl: \(22\) The requested URL returned error: 404( Not Found)?% - curl -s -S --fail --location https://build2.org/bogus + curl -sS --location --data-binary @- https://build2.org/bogus + + curl -sS --fail --location https://build2.org/bogus %curl: \(22\) The requested URL returned error: 404( Not Found)?% EOE } |