Skip to content

Commit

Permalink
add multiline_comment_test
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanBrewer317 committed Apr 5, 2024
1 parent b065b94 commit 60e3c21
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion test/party_test.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -286,4 +286,15 @@ pub fn until_test() {
|> should.equal(Error(party.Unexpected(party.Position(1, 4), "EOF")))
party.go(party.until(do: party.char("a"), until: party.char("b")), "ac")
|> should.equal(Error(party.Unexpected(party.Position(1, 2), "c")))
}
}

pub fn multiline_comment_test() {
party.go(
party.map(
party.until(do: party.satisfy(fn(_) { True }), until: party.string("*/")),
string.concat,
),
"hello! * */ ",
)
|> should.equal(Ok("hello! * "))
}

0 comments on commit 60e3c21

Please sign in to comment.