CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli <strk> 07/10/11 21:55:08
Modified files: . : ChangeLog testsuite/actionscript.all: with.as Log message: * testsuite/actionscript.all/with.as: test that locals take precedence over 'with' stack. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4594&r2=1.4595 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/with.as?cvsroot=gnash&r1=1.21&r2=1.22 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.4594 retrieving revision 1.4595 diff -u -b -r1.4594 -r1.4595 --- ChangeLog 11 Oct 2007 11:29:34 -0000 1.4594 +++ ChangeLog 11 Oct 2007 21:55:08 -0000 1.4595 @@ -1,3 +1,8 @@ +2007-10-11 Sandro Santilli <[EMAIL PROTECTED]> + + * testsuite/actionscript.all/with.as: test that locals take + precedence over 'with' stack. + 2007-10-11 Benjamin Wolsey <[EMAIL PROTECTED]> * server/asobj/Key.cpp: clean up. Index: testsuite/actionscript.all/with.as =================================================================== RCS file: /sources/gnash/gnash/testsuite/actionscript.all/with.as,v retrieving revision 1.21 retrieving revision 1.22 diff -u -b -r1.21 -r1.22 --- testsuite/actionscript.all/with.as 1 Oct 2007 07:22:12 -0000 1.21 +++ testsuite/actionscript.all/with.as 11 Oct 2007 21:55:08 -0000 1.22 @@ -21,7 +21,7 @@ // compile this test case with Ming makeswf, and then // execute it like this gnash -1 -r 0 -v out.swf -rcsid="$Id: with.as,v 1.21 2007/10/01 07:22:12 strk Exp $"; +rcsid="$Id: with.as,v 1.22 2007/10/11 21:55:08 strk Exp $"; #include "check.as" @@ -321,8 +321,29 @@ // #endif //OUTPUT_VERSION > 5 +//--------------------------------------------------------- +// Test with() inside user-defined function context +//--------------------------------------------------------- + +function testWith() +{ + var a = 1; + with (o) + { + check_equals(a, 4); + } +} + +o = new Object(); +o.a = 4; +testWith(); + +//--------------------------------------------------------- +// END OF TESTS +//--------------------------------------------------------- + #if OUTPUT_VERSION < 6 - check_totals(26); + check_totals(27); #else - check_totals(55); // a-ah! + check_totals(56); // a-ah! #endif _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit