diff options
Diffstat (limited to 'tests')
-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 } |