Skip to content

Instantly share code, notes, and snippets.

@lthms
Created September 9, 2018 20:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lthms/b9482e03f6a574647cd61e4e01f4249a to your computer and use it in GitHub Desktop.
Save lthms/b9482e03f6a574647cd61e4e01f4249a to your computer and use it in GitHub Desktop.
#[test]
fn test_paragraph() {
assert_eq!(
paragraph("[Hi stranger, this is me.] Indeed.\n\n[Hi]"),
Ok(
(
"\n\n[Hi]",
Paragraph(
vec![
Component::Dialogue(
Reply::Simple(
vec![
Format::Raw(
vec![
Atom::Word("Hi"),
Atom::Word("stranger"),
Atom::Punctuation(Mark::Comma),
Atom::Word("this"),
Atom::Word("is"),
Atom::Word("me"),
Atom::Punctuation(Mark::Point)
]
)
]
),
None
),
Component::Teller(
vec![
Format::Raw(
vec![
Atom::Word("Indeed"),
Atom::Punctuation(Mark::Point)
]
)
]
)
]
)
)
)
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment