]> git.sven.stormbind.net Git - sven/tclcurl.git/blobdiff - tests/failOnError.tcl
Imported Upstream version 7.19.6
[sven/tclcurl.git] / tests / failOnError.tcl
diff --git a/tests/failOnError.tcl b/tests/failOnError.tcl
new file mode 100755 (executable)
index 0000000..ed2ea67
--- /dev/null
@@ -0,0 +1,17 @@
+package require TclCurl
+
+set curlHandle [curl::init]
+$curlHandle configure -url "127.0.0.1/cosa.html"
+
+$curlHandle configure -failonerror 0 ; # This is the default
+puts "With failonerror==0:"
+catch {$curlHandle perform}
+puts "\n\n\n\n\n"
+puts "With failonerror==1:"
+$curlHandle configure -failonerror 1
+catch {$curlHandle perform}
+
+$curlHandle cleanup
+
+
+