Revision: 637 Author: mwhapples@xxxxxxxxx Date: Mon May 21 05:40:26 2012 Log: Some corrections to the JSON stuff. http://code.google.com/p/liblouis/source/detail?r=637 Modified: /trunk/tests/runHarness.py ======================================= --- /trunk/tests/runHarness.py Mon May 21 04:16:36 2012 +++ /trunk/tests/runHarness.py Mon May 21 05:40:26 2012 @@ -31,9 +31,21 @@ import json from louis import translate+from louis import noContractions, compbrlAtCursor, dotsIO, comp8Dots, pass1Only, compbrlLeftCursor, otherTrans, ucBrl
from glob import iglob from os.path import basename +modes = { + 'noContractions': noContractions, + 'compbrlAtCursor': compbrlAtCursor, + 'dotsIO': dotsIO, + 'comp8Dots': comp8Dots, + 'pass1Only': pass1Only, + 'compbrlLeftCursor': compbrlLeftCursor, + 'otherTrans': otherTrans, + 'ucBrl': ucBrl +} + def showCurPos(length, pos1, marker1="^", pos2=None, marker2="*"):"""A helper function to make a string to show the position of the given cursor."""
display = [" "] *length @@ -111,8 +123,10 @@ f.close() print("Processing %s" %harness) failed = 0 - tableList = [harnessModule['table']] + tableList = [harnessModule['table'].encode('UTF-8')] for test in harnessModule['tests']: + if 'mode' in test: + test['mode'] = modes[test['mode']] text = test['txt'] mode = test.get('mode', 0) cursorPos = test.get('cursorPos', 0) For a description of the software, to download it and links to project pages go to http://www.abilitiessoft.com