def METHOD_NAME(self):
    CASES = [
        ("= x }", 4),
        ("= x;}", 3),
        ("= x; }", 3),
        ("echo $x;}", 8),
        ("echo $x; }", 8),
        ("= x\n}", 3),
        ("echo $x\n}", 8),
    ]
    for code_str, end_pos in CASES:
        line_reader = reader.StringLineReader(code_str, self.arena)
        cmd_parser = self.parse_ctx.MakeOshParser(line_reader)
        lexer = cmd_parser.lexer
        node = cmd_parser.ParseCommand()
        # Assert that we are at the RBrace. Ie,
        # 'x }\n'
        #    ^
        self.assertEqual(end_pos, lexer.line_lexer.line_pos)
        print("-----")
        print("%r" % lexer.line_lexer.src_line.content)
        print(" " * (lexer.line_lexer.line_pos + 1) + "^")
        print("-----")