From ed749ce280bf3b2d2f88fc97105cf117e1483060 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 3 Jun 2012 21:06:43 +0300 Subject: testxml: add check for tsx files testxml: add partial support for extern tilesets. --- testxml/testxml.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/testxml/testxml.py b/testxml/testxml.py index 650785c..99bf386 100755 --- a/testxml/testxml.py +++ b/testxml/testxml.py @@ -16,7 +16,7 @@ from xml.dom import minidom from PIL import Image import zlib -filt = re.compile(".+[.](xml|tmx)", re.IGNORECASE) +filt = re.compile(".+[.](xml|tmx|tsx)", re.IGNORECASE) filtmaps = re.compile(".+[.]tmx", re.IGNORECASE) filtimages = re.compile(".+[.]png", re.IGNORECASE) filtxmls = re.compile(".+[.]xml", re.IGNORECASE) @@ -1216,6 +1216,17 @@ def testMap(file, path): tilesMap = dict() for tileset in dom.getElementsByTagName("tileset"): + try: + source = tileset.attributes["source"].value + if source is not None and source != "": + file2 = os.path.abspath(parentDir + os.path.sep + mapsDir + source) + if not os.path.isfile(file2): + showMsgFile(file, "missing source file in tileset " + source, True) + + continue; + except: + None + name = readAttr(tileset, "name", "", "warning: missing tile name: " + file, False) tileWidth = readAttrI(tileset, "tilewidth", mapTileWidth, \ "error: missing tile width in tileset: " + name + ", " + file, True) -- cgit v1.2.3-70-g09d2