summaryrefslogtreecommitdiff
path: root/testxml/testxml.py
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-10 20:49:42 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-10 20:49:42 +0300
commitab236e4c360ea53514ec83e6c8909585f237aaf5 (patch)
treeec2a46d822d2323f785922dcf3a85a721a5f003a /testxml/testxml.py
parent4429504e764f0dec3ed4c0071b63819571c86253 (diff)
downloadtools-ab236e4c360ea53514ec83e6c8909585f237aaf5.tar.gz
tools-ab236e4c360ea53514ec83e6c8909585f237aaf5.tar.bz2
tools-ab236e4c360ea53514ec83e6c8909585f237aaf5.tar.xz
tools-ab236e4c360ea53514ec83e6c8909585f237aaf5.zip
testxml: fix validating dye palette with GIMP color names.
Diffstat (limited to 'testxml/testxml.py')
-rwxr-xr-xtestxml/testxml.py20
1 files changed, 11 insertions, 9 deletions
diff --git a/testxml/testxml.py b/testxml/testxml.py
index 70b2865..c2b5856 100755
--- a/testxml/testxml.py
+++ b/testxml/testxml.py
@@ -256,20 +256,22 @@ def testDye(id, color, text, src, iserr):
def testDyeInternal(id, col, text, src, iserr):
- if col[0] != "#":
+ oldPalette = col[0] == "#"
+ if oldPalette == False and col[0] != "@":
showMsg(id, "incorrect dye colors: " + text, src, iserr)
return False
- paletes = dyesplit2.split(col[1:])
- for palete in paletes:
- if len(palete) != 6:
- showMsg(id, "incorrect dye palete: " + text, src, iserr)
- return False
-
- for char in palete.lower():
- if (char < '0' or char > '9') and (char < 'a' or char > 'f'):
+ if oldPalette:
+ paletes = dyesplit2.split(col[1:])
+ for palete in paletes:
+ if len(palete) != 6:
showMsg(id, "incorrect dye palete: " + text, src, iserr)
return False
+
+ for char in palete.lower():
+ if (char < '0' or char > '9') and (char < 'a' or char > 'f'):
+ showMsg(id, "incorrect dye palete: " + text, src, iserr)
+ return False
return True