def test_repeatable_one_or_more():
    """
    Tests one or more repeatable operator.
    """

    grammar = """
    S: "2" b+ "3";

    terminals
    b: "1";
    """

    g = Grammar.from_string(grammar)
    assert g.get_nonterminal('b_1')

    p = Parser(g)

    input_str = '2 1 1 1 3'
    result = p.parse(input_str)
    assert result == ["2", ["1", "1", "1"], "3"]

    input_str = '2 3'
    with pytest.raises(ParseError) as e:
        result = p.parse(input_str)
    assert 'Expected: b' in str(e.value)