diff --git a/pub/itest/checkIntegrity.ps b/pub/itest/checkIntegrity.ps new file mode 100644 index 0000000000000000000000000000000000000000..d31a46fd4bb09d2a8803ab072e57b626a7b2912c --- /dev/null +++ b/pub/itest/checkIntegrity.ps @@ -0,0 +1,16 @@ + {Script run} stopped + { + (\n===> Integrity test failed: ) print Script print ( has error\n\n) print + handleerror + (ignore this error which only serves to force a return value of 1) /syntaxerror signalerror + }{ + % script passed, now check the stack + count dup 0 eq { + pop (\n===> Integrity test passed: ) print Script print ( terminated normally\n\n) print + } { + (\n===> Integrity test failed: ) print Script print ( left ) print + 3 string cvs print ( item(s) on stack\n\n) print + Script /syntaxerror signalerror + } ifelse + } ifelse + quit