X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fas3%2Ftest;h=dc79c9048d2c0dcf6826428312085ca6c3636e8d;hb=328c4aaa49aafc44551f72cb30fa5979542fa635;hp=e30b451c20e78d302237b0d4f02a60a0270deef9;hpb=ab2f7a4cd0eda09ff3af29058c45d098f869b598;p=swftools.git diff --git a/lib/as3/test b/lib/as3/test index e30b451..dc79c90 100755 --- a/lib/as3/test +++ b/lib/as3/test @@ -29,8 +29,8 @@ import select from optparse import OptionParser CMD_ARGS=[] -#CMD = "./parser" -CMD="as3compile" +CMD = "./parser" +#CMD="as3compile" CMD_ARGS=["-o","abc.swf"] def check(s): @@ -130,8 +130,12 @@ class Cache: self.runtime = 5 # allow more time if we're tagging this state self.checknum=-1 + self.checkfile=None if len(args): - self.checknum = int(args[0]) + try: + self.checknum = int(args[0]) + except ValueError: + self.checkfile = args[0] @staticmethod def load(filename): @@ -148,11 +152,15 @@ class Cache: fi.close() def highlight(self, nr, filename): + if self.checkfile and filename==self.checkfile: + return 1 return self.checknum==nr def skip_file(self, nr, filename): if self.checknum>=0 and nr!=self.checknum: return 1 + if self.checkfile and filename!=self.checkfile: + return 1 if not self.all and self.milestone.get(filename,"new")!="ok": return 1 if self.diff and self.filename2status(filename,"new")=="ok":