I'm happy to add tests for bug fixes etc. that I push, so I tried compiling
and running the PS test suite. It requires the Arnesi and FiveAM libraries,
so I downloaded and asdf-loaded those, then called (RUN-TESTS).
The output I got seems to include many failures. How many of these
these in a Lisp that only loaded the PARENSCRIPT-TEST package.
Running reference tests:
...............f....................................................................f....
Did 89 checks.
Pass: 87 (97%)
Skip: 0 ( 0%)
Fail: 2 ( 2%)
Failure Details:
--------------------------------
THE-HTML-GENERATOR-3 []:
(NORMALIZE-JS-CODE "document.write('<A HREF=\"#\" ONCLICK=\"' + 'javascript:' + 'transport()' + '\">link</A>');") evaluated to "document.write('<A HREF=\"#\" ONCLICK=\"' + 'javascript:' + 'transport()' + '\">link</A>');", which is not STRING= to "document.write('<A HREF=\"#\" ONCLICK=\"' + ['javascript:', 'transport()'].join('') + '\">link</A>');"..
--------------------------------
--------------------------------
ASSIGNMENT-11 []:
(NORMALIZE-JS-CODE "var _js2 = someDiv;
var _js1 = 123 + 'px';
_js2.style.left = _js1;") evaluated to "var _js2 = someDiv; var _js1 = 123 + 'px'; _js2.style.left = _js1;", which is not STRING= to "left(someDiv) = 123 + 'px';"..
--------------------------------
Running other tests:
.................................................................................................f............ff.....f...............f.......................................................................f.f....
;Compiler warnings :
; In an anonymous lambda form: Undeclared free variable X..f.......f........
Did 231 checks.
Pass: 222 (96%)
Skip: 0 ( 0%)
Fail: 9 ( 3%)
Failure Details:
--------------------------------
VALUES2 []:
(NORMALIZE-JS-CODE "var val1_1 = x;
var valrest2 = [y];
if (undefined !== arguments['callee']['caller']['mv']) {
arguments['callee']['caller']['mv'] = valrest2;
};
val1_1;") evaluated to "var val1_1 = x; var valrest2 = [y]; if (undefined !== arguments['callee']['caller']['mv']) { arguments['callee']['caller']['mv'] = valrest2; }; val1_1;", which is not STRING= to "var val1_1 = x; var valrest2 = [y]; if (undefined !==
arguments.callee.caller.mv) {
arguments.callee.caller.mv = valrest2; }; val1_1;"..
--------------------------------
--------------------------------
VALUES3 []:
(NORMALIZE-JS-CODE "var val1_1 = x;
var valrest2 = [y, z];
if (undefined !== arguments['callee']['caller']['mv']) {
arguments['callee']['caller']['mv'] = valrest2;
};
val1_1;") evaluated to "var val1_1 = x; var valrest2 = [y, z]; if (undefined !== arguments['callee']['caller']['mv']) { arguments['callee']['caller']['mv'] = valrest2; }; val1_1;", which is not STRING= to "var val1_1 = x; var valrest2 = [y, z]; if (undefined !==
arguments.callee.caller.mv) {
arguments.callee.caller.mv = valrest2; }; val1_1;"..
--------------------------------
--------------------------------
VALUES-RETURN []:
(NORMALIZE-JS-CODE "var val1_1 = x;
var valrest2 = [y];
if (undefined !== arguments['callee']['caller']['mv']) {
arguments['callee']['caller']['mv'] = valrest2;
};
return val1_1;") evaluated to "var val1_1 = x; var valrest2 = [y]; if (undefined !== arguments['callee']['caller']['mv']) { arguments['callee']['caller']['mv'] = valrest2; }; return val1_1;", which is not STRING= to "var val1_1 = x; var valrest2 = [y]; if (undefined !==
arguments.callee.caller.mv) {
arguments.callee.caller.mv = valrest2; }; return val1_1;"..
--------------------------------
--------------------------------
EVAL-WHEN-MACROLET-EXPANSION []:
*LISP-OUTPUT* evaluated to ORIGINAL-VALUE, which is not EQL to :CL-USER..
--------------------------------
--------------------------------
EVAL-WHEN-MACRO-EXPANSION []:
*LISP-OUTPUT* evaluated to ORIGINAL-VALUE, which is not EQL to :CL-USER..
--------------------------------
--------------------------------
MV-BIND1 []:
(NORMALIZE-JS-CODE "returnsMv();
var prevmv2 = arguments['callee']['mv'];
try {
arguments['callee']['mv'] = true;
var a = doesnt();
var mv1 = typeof arguments['callee']['mv'] === 'object' ? arguments['callee']['mv'] : new Array(1);
var b = mv1[0];
alert(a);
alert(b);
} finally {
if (undefined === prevmv2) {
delete arguments['callee']['mv'];
} else {
arguments['callee']['mv'] = prevmv2;
};
};") evaluated to "returnsMv(); var prevmv2 = arguments['callee']['mv']; try { arguments['callee']['mv'] = true; var a = doesnt(); var mv1 = typeof arguments['callee']['mv'] === 'object' ? arguments['callee']['mv'] : new Array(1); var b = mv1[0]; alert(a); alert(b); } finally { if (undefined === prevmv2) { delete arguments['callee']['mv']; } else { arguments['callee']['mv'] = prevmv2; }; };", which is not STRING= to "returnsMv(); var prevmv2 =
arguments.callee.mv; try {
arguments.callee.mv = true; var a = doesnt(); var mv1 = typeof
arguments.callee.mv === 'object' ?
arguments.callee.mv : new Array(1); var b = mv1[0]; alert(a); alert(b); } finally { if (undefined === prevmv2) { delete
arguments.callee.mv; } else {
arguments.callee.mv = prevmv2; }; };"..
--------------------------------
--------------------------------
EVAL-WHEN-LISP-SIDE []:
*LISP-OUTPUT* evaluated to ORIGINAL-VALUE, which is not EQL to IT-WORKS..
--------------------------------
--------------------------------
EVAL-WHEN-LISP-SIDE []:
JS-OUTPUT evaluated to "LISPOUTPUT = 'itWorks';", which is not STRING= to ""..
--------------------------------
--------------------------------
FUNCALL-IF-EXPRESSION []:
(NORMALIZE-JS-CODE "document.write(LINKORNOT === 1 ? '<A HREF=\"#\" ONCLICK=\"' + 'javascript:' + 'transport()' + '\">' + img + '</A>' : img);") evaluated to "document.write(LINKORNOT === 1 ? '<A HREF=\"#\" ONCLICK=\"' + 'javascript:' + 'transport()' + '\">' + img + '</A>' : img);", which is not STRING= to "document.write(LINKORNOT === 1 ? '<A HREF=\"#\" ONCLICK=\"' + ['javascript:', 'transport()'].join('') + '\">' + img + '</A>' : img);"..
--------------------------------
Running Package System tests:
f.f..f..
Did 8 checks.
Pass: 5 (62%)
Skip: 0 ( 0%)
Fail: 3 (37%)
Failure Details:
--------------------------------
NAMESPACE-AND-SPECIAL-FORMS []:
(PARENSCRIPT-TEST::NORMALIZE-JS-CODE "var prefix_foo = { prefix_bar : 1, prefix_notAKeyword : prefix_something };
return !prefix_foo && prefix_foo.prefix_bar + prefix_someOtherVar;") evaluated to "var prefix_foo = { prefix_bar : 1, prefix_notAKeyword : prefix_something }; return !prefix_foo && prefix_foo.prefix_bar + prefix_someOtherVar;", which is not COMMON-LISP:STRING= to "var foo = { bar : 1, notAKeyword : something }; return !foo && foo.bar + someOtherVar;"..
--------------------------------
--------------------------------
OBFUSCATION1 []:
(NORMALIZE-JS-CODE "function g1(a, b, g2) {
return a + my_library_libraryFunction(b, g2);
};") evaluated to "function g1(a, b, g2) { return a + my_library_libraryFunction(b, g2); };", which is not STRING= to "function g1(a, b, g1) { return a + my_library_libraryFunction(b, g1); };"..
--------------------------------
--------------------------------
EXPORTED-INTERFACE []:
(PARENSCRIPT-TEST::NORMALIZE-JS-CODE "function interfaceFunction(prefix_baz) {
return prefix_baz + g2;
};") evaluated to "function interfaceFunction(prefix_baz) { return prefix_baz + g2; };", which is not COMMON-LISP:STRING= to "function interfaceFunction(baz) { return baz + g1; };"..
--------------------------------
NIL
PS-TEST>