//var PostscriptGraphics
//var SVGGraphics
-// XXX temporary testing code
-var inJSShell = false;
-try {
- putstr("");
- inJSShell = true;
-} catch (e) { }
-
var MockParser = (function() {
function constructor(objs) {
this.objs = objs.slice(0);
});
}
-if (inJSShell)
- runEchoTests();
+function runParseTests() {
+}
+
+if ("arguments" in this) {
+ const cmds = {
+ "-e": runEchoTests,
+ "-p": runParseTests
+ }
+ for (n in arguments) {
+ var fn = cmds[arguments[n]];
+ if (fn)
+ fn();
+ }
+}