Macro collapse::collapsed_ne
source · macro_rules! collapsed_ne { ($input:expr, $output:expr) => { ... }; ($input:expr, $output:expr, $($arg:tt)+) => { ... }; }
Expand description
Compare two strings, collapse consecutive whitespace, and assert their inequality. Panics if two strings are equivalent after collapsing whitespace.
#[macro_use]
use collapse::*;
collapsed_ne!("one space", "ONE SPACE");
collapsed_ne!("two spaces", "TWO SPACES");
collapsed_ne!("new\r\nlines", "NEW\nLINES");
collapsed_ne!(" lead \t tail \r", "LEAD TAIL");