diff --git a/devtools/make_help.py b/devtools/make_help.py index 1ce208e5d2..a26c36bb4f 100755 --- a/devtools/make_help.py +++ b/devtools/make_help.py @@ -465,6 +465,15 @@ def _LinkLine(line): return html_line +def _AttrsToString(attrs): + if not attrs: + return '' + + # Important: there's a leading space here. + # TODO: Change href="$help:command" to href="help.html#command" + return ''.join(' %s="%s"' % (k, v) for (k, v) in attrs) + + class IndexLinker(HTMLParser.HTMLParser): def __init__(self, pre_class, out): @@ -482,6 +491,13 @@ def log(self, msg, *args): ind = self.indent * ' ' log(ind + msg, *args) + def handle_decl(self, data): + """Pass through """ + self.out.write('' % data) + + def handle_startendtag(self, tag, attrs): + self.out.write('<%s%s/>' % (tag, _AttrsToString(attrs))) + def handle_starttag(self, tag, attrs): if tag == 'pre': values = [v for k, v in attrs if k == 'class'] @@ -490,13 +506,7 @@ def handle_starttag(self, tag, attrs): if class_name: self.linking = True - # TODO: Change href="$help:command" to href="help.html#command" - if attrs: - attr_str = ' ' # leading space - attr_str += ' '.join('%s="%s"' % (k, v) for (k, v) in attrs) - else: - attr_str = '' - self.out.write('<%s%s>' % (tag, attr_str)) + self.out.write('<%s%s>' % (tag, _AttrsToString(attrs))) self.log('start tag %s %s', tag, attrs) self.indent += 1 diff --git a/test/unit.sh b/test/unit.sh index 65090718cb..7e48e0ebca 100755 --- a/test/unit.sh +++ b/test/unit.sh @@ -44,8 +44,7 @@ banner() { } tests-to-run() { - # TODO: Add opy. - for t in {build,test,native,asdl,core,oil_lang,osh,frontend,pylib,test,tools}/*_test.py; do + for t in {devtools,build,test,native,asdl,core,oil_lang,osh,frontend,pylib,test,tools}/*_test.py; do # For Travis after build/dev.sh minimal: if we didn't build fastlex.so, # then skip a unit test that will fail. if test $t = 'native/fastlex_test.py' && ! test -e 'fastlex.so'; then