[parenscript-devel] The PS test suite

Vladimir Sedach vsedach at gmail.com
Tue May 25 01:52:47 UTC 2010


Which implementation are you running on? I know there are differences
in output related to the gensym counter and macroexpansion time
between SBCL and CLISP/Clozure (I write tests based on the output of
the former).

Are you sure you're not using any custom code? In particular this piece:

['javascript:', 'transport()'].join('')

leads me to believe you might have at least a custom CONCATENATE
loaded. But a lot of the errors listed look like real bugs. I just
tried the test suite in CLISP and it gives a different list of errors,
and many of them aren't just gensym differences but real bugs as well.

I guess I'll need to spend some time fixing these
compile/load/macroexpand problems.

Vladimir

2010/5/24 Daniel Gackle <danielgackle at gmail.com>:
> 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
> are actual failures in the official tests, and how many are glitches local
> to me?
> Since we have many custom PS macros, I was careful to run
> these in a Lisp that only loaded the PARENSCRIPT-TEST package.
> Daniel
>
>
> 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>
> _______________________________________________
> parenscript-devel mailing list
> parenscript-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel
>
>




More information about the parenscript-devel mailing list