summaryrefslogtreecommitdiff
path: root/swat/esptest
diff options
context:
space:
mode:
Diffstat (limited to 'swat/esptest')
-rw-r--r--swat/esptest/exception.esp37
-rw-r--r--swat/esptest/index.esp3
2 files changed, 39 insertions, 1 deletions
diff --git a/swat/esptest/exception.esp b/swat/esptest/exception.esp
new file mode 100644
index 0000000000..d569fbe776
--- /dev/null
+++ b/swat/esptest/exception.esp
@@ -0,0 +1,37 @@
+<HTML>
+<TITLE>
+Samba4 ESP test
+</TITLE>
+<BODY>
+<h1>Samba4 exception test</h1>
+
+<form name="ExceptionTest" method="POST" action="@@request['SCRIPT_NAME']">
+ <input name="submit" type="submit" value="Generate Exception">
+ <input name="submit" type="submit" value="No Exception">
+ <input name="submit" type="submit" value="Cancel"><br>
+</form>
+
+<%
+if (request['REQUEST_METHOD'] == "POST") {
+ /* if they cancelled then take them back to the list of tests */
+ if (form['submit'] == "Cancel") {
+ redirect("index.esp");
+ }
+
+ function TestFunction(arg1, arg2) {
+ return "OK";
+ }
+
+ if (form['submit'] == "Generate Exception") {
+ write("I expect you to die Mr Bond!<br>\n");
+ TestFunction("foo");
+ } else {
+ write("no exception<br>\n");
+ TestFunction("foo", "bar");
+ }
+}
+%>
+
+and here is some filler text ...
+</BODY>
+</HTML>
diff --git a/swat/esptest/index.esp b/swat/esptest/index.esp
index e85937e4bf..7a5952e955 100644
--- a/swat/esptest/index.esp
+++ b/swat/esptest/index.esp
@@ -1,5 +1,6 @@
<%
- var tests = new Array("formtest", "showvars", "include", "session", "loadparm");
+ var tests = new Array("formtest", "showvars", "include",
+ "session", "loadparm", "exception");
%>
<HTML>