X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fas3%2Ftest;h=8f9667003336325dcab4fc859e510bd3b04a526a;hb=79e69e1d109a95f9495b96b29a723758d06a71d9;hp=de4a2e2eed93e6731b163d9434a885cfaad4686e;hpb=0466de1ec2360f00408c531a15aa5146e268228d;p=swftools.git diff --git a/lib/as3/test b/lib/as3/test index de4a2e2..8f96670 100755 --- a/lib/as3/test +++ b/lib/as3/test @@ -42,7 +42,10 @@ def check(s): if "/" not in line: return 0 i = line.index('/') - nr,len = int(line[3:i]),int(line[i+1:]) + try: + nr,len = int(line[3:i]),int(line[i+1:]) + except ValueError: + return 0 if nr<1 or nr>len: return 0 if not row: @@ -103,7 +106,7 @@ class Cache: def parse_args(self): parser = OptionParser() parser.add_option("-d", "--diff", dest="diff", help="Only run tests that failed the last time",action="store_true") - parser.add_option("-a", "--all", dest="all", help="Run all tests (also tests expected fail)",action="store_true") + parser.add_option("-a", "--all", dest="all", help="Run all tests (also tests expected to fail)",action="store_true") parser.add_option("-t", "--tag", dest="tag", help="Mark the current pass/fail statistic as milestone",action="store_true") (options, args) = parser.parse_args() @@ -145,9 +148,9 @@ class Cache: def skip_file(self, nr, filename): if self.checknum>=0 and nr!=self.checknum: return 1 - if not self.all and self.milestone[filename]!="ok": + if not self.all and self.milestone.get(filename,"new")!="ok": return 1 - if self.diff and self.filename2status[filename]=="ok": + if self.diff and self.filename2status(filename,"new")=="ok": return 1 return 0