'Test that semicolons at the end of a tgrep2 search string won\'t
cause a parse failure.'

def test_trailing_semicolon(self):

    tree = ParentedTree.fromstring(u'(S    (NP    (DT    the)    (JJ    big)    (NN    dog))    (VP    bit)    (NP    (DT    a)    (NN    cat)))')
    self.assertEqual(list(tgrep.tgrep_positions(u'NN', [tree])), [[(0, 2), (2, 1)]])
    self.assertEqual(list(tgrep.tgrep_positions(u'NN;', [tree])), [[(0, 2), (2, 1)]])
    self.assertEqual(list(tgrep.tgrep_positions(u'NN;;', [tree])), [[(0, 2), (2, 1)]])
