public class Main extends flash.display.MovieClip {
function Main() {
var a:Array = new Array(1,2,3);
- if(a[0]==1) trace("ok 1/8");
- if(a[1]==2) trace("ok 2/8");
- if(a[2]==3) trace("ok 3/8");
- if(a.length==3) trace("ok 4/8");
+ if(a[0]==1) trace("ok 1/10");
+ if(a[1]==2) trace("ok 2/10");
+ if(a[2]==3) trace("ok 3/10");
+ if(a.length==3) trace("ok 4/10");
var b:Array = [1,2,3];
- if(b[0]==1) trace("ok 5/8");
- if(b[1]==2) trace("ok 6/8");
- if(b[2]==3) trace("ok 7/8");
- if(b.length==3) trace("ok 8/8");
+ if(b[0]==1) trace("ok 5/10");
+ if(b[1]==2) trace("ok 6/10");
+ if(b[2]==3) trace("ok 7/10");
+ if(b.length==3) trace("ok 8/10");
// test for ]+<int> parser bug:
var check = (3 == a[0]+1);
-
+
+ var list:Array = ["ok 9/10", "ok 10/10"];
+ for each(var s:String in list) {
+ trace(s);
+ }
+
trace("[exit]");
}
}
import flash.display.MovieClip
public class Main extends flash.display.MovieClip {
var count:int = 1;
- var num:int = 28;
+ var num:int = 30;
function assert(b:Boolean) {
if(b) {
trace("ok "+count+"/"+num);
assert(2+3==5);
assert(2-3==-1);
+ /* test or */
+ var y = 0;
+ var x = y || 1;
+ assert(x);
+ var z = x && 1;
+ assert(z);
+
/* test not */
trace("[not]");
assert(!false);
import flash.display.MovieClip
public class Main extends flash.display.MovieClip {
internal var s0;
- internal var s1:String="ok 3/4";
+ internal var s1:String="ok 3/5";
internal var s2;
public function printok1() {
- trace("ok 1/4");
+ trace("ok 1/5");
}
public function printok2(x:uint) {
trace(this.s0);
public function printok3() {
trace(this.s2);
}
+
+ public function f() {
+ trace("ok 5/5");
+ }
+ public function get_f() {
+ return this["f"];
+ }
+
function Main() {
this.printok1();
- this.s0 = "ok 2/4";
+ this.s0 = "ok 2/5";
this.printok2(0);
// member w/ default value:
trace(this.s1);
//omit "this":
- s2 = "ok 4/4";
+ s2 = "ok 4/5";
printok3();
+
+ get_f()();
trace("[exit]");
}
return 1
def run(self):
- ret,output = runcmd("flashplayer",["abc.swf"],wait=cache.runtime)
+ ret,output = runcmd("flashplayer",[os.path.join(os.getcwd(),"abc.swf")],wait=cache.runtime)
os.system("killall flashplayer")
self.flash_output = output
} else {
int i1=0,i2=len;
// find start
- while(!strchr(" \n\r\t", text[i1])) i1++;
+ while(!strchr(" \n\r\t\xa0", text[i1])) i1++;
// strip
- while(strchr(" \n\r\t", text[i1])) i1++;
- while(strchr(" \n\r\t", text[i2-1])) i2--;
+ while(strchr(" \n\r\t\xa0", text[i1])) i1++;
+ while(strchr(" \n\r\t\xa0", text[i2-1])) i2--;
if(i2!=len) text[i2]=0;
filename = strdup(&text[i1]);
}
XMLSTRING ["][^"]*["]
STRING ["](\\[\x00-\xff]|[^\\"\n])*["]|['](\\[\x00-\xff]|[^\\'\n])*[']
-S [ \n\r\t]
+S [ \n\r\t\xa0]
MULTILINE_COMMENT [/][*]+([*][^/]|[^/*]|[^*][/]|[\x00-\x1f])*[*]+[/]
SINGLELINE_COMMENT \/\/[^\n\r]*[\n\r]
REGEXP [/]([^/\n]|\\[/])*[/][a-zA-Z]*
[/][*] {syntaxerror("syntax error: unterminated comment", yytext);}
^include{S}+{STRING}{S}*/\n {l();handleInclude(yytext, yyleng, 1);}
-^include{S}+[^" \t\r\n][\x20-\xff]*{S}*/\n {l();handleInclude(yytext, yyleng, 0);}
+^include{S}+[^" \t\xa0\r\n][\x20-\xff]*{S}*/\n {l();handleInclude(yytext, yyleng, 0);}
{STRING} {l(); BEGIN(DEFAULT);handleString(yytext, yyleng);return T_STRING;}
{CDATA} {l(); BEGIN(DEFAULT);handleCData(yytext, yyleng);return T_STRING;}