commit fd22daca17bf987d29a9ec3444b57ddd5b2bec0a Author: Daniel Swanson Date: Fri Jul 30 07:41:02 2021 -0500 add skip command diff --git a/apertium-regtest.py b/apertium-regtest.py index fc2a5f1..7418af6 100755 --- a/apertium-regtest.py +++ b/apertium-regtest.py @@ -813,6 +813,13 @@ Abbreviated form: `a`''' if self.current_corpus and self.current_hash: self.lines_accepted[self.current_corpus].append(self.current_hash) self.next_hash(True) + def do_k(self, arg): + 'Synonym for `skip`' + self.do_skip('') + def do_skip(self, arg): + '''Move to the next changed line. +Abbreviated form: `k`''' + self.next_hash(True) def do_ag(self, arg): 'Synonym for `addgold`' self.do_addgold('') @@ -935,9 +942,10 @@ def check_hash(corpus, hsh): gld = data['gold'].get(hsh, []) if out in gld: continue - gold = False - if out != exp: - expect = False + else: + gold = False + if out != exp: + expect = False return expect, gold def static_test(ignore_add=False):