aboutsummaryrefslogtreecommitdiff
path: root/pkg/vocl/errtest/zztest.cl
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /pkg/vocl/errtest/zztest.cl
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'pkg/vocl/errtest/zztest.cl')
-rw-r--r--pkg/vocl/errtest/zztest.cl24
1 files changed, 24 insertions, 0 deletions
diff --git a/pkg/vocl/errtest/zztest.cl b/pkg/vocl/errtest/zztest.cl
new file mode 100644
index 00000000..d63151f1
--- /dev/null
+++ b/pkg/vocl/errtest/zztest.cl
@@ -0,0 +1,24 @@
+#{ ZZTEST -- Test various iferr constructs.
+
+procedure zztest ()
+
+begin
+ int nerrs
+
+ onerror ("flpr")
+
+ printf ("Testing iferr....\n")
+ nerrs = 0
+
+ for (i=1; i <= 5; i=i+1) {
+ iferr { fpe () } then {
+ print (" error from test #"//i)
+ nerrs = nerrs + 1
+ } else {
+ print (" NO error from test #"//i)
+ }
+ }
+
+ if (nerrs > 0)
+ error (999, "errors found in script")
+end