Skip to content

Instantly share code, notes, and snippets.

@lthms
Created September 9, 2018 18:29
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/6ac45d7f9ebca491176f00549bb882d0 to your computer and use it in GitHub Desktop.
Save lthms/6ac45d7f9ebca491176f00549bb882d0 to your computer and use it in GitHub Desktop.
#[test]
fn test_raw() {
assert_eq!(
raw("Hi stranger, how are you?"),
Ok(
(
"",
Format::Raw(
vec![
Atom::Word("Hi"),
Atom::Word("stranger"),
Atom::Punctuation(Mark::Comma),
Atom::Word("how"),
Atom::Word("are"),
Atom::Word("you"),
Atom::Punctuation(Mark::Question),
]
)
)
)
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment