Files

28 lines
848 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
expect("\u2028".length).toBe(1);
expect("\u2028").toBe("\u2028");
expect("before
after".length).toBe(12);
expect("before
after").toBe("before\u2028after");
// ^ That's a U+2028 LINE SEPARATOR UTF-16 char (between 'before' and 'after')
expect("
".length).toBe(1);
expect("
").toBe("\u2028");
// ^ That's a U+2028 LINE SEPARATOR UTF-16 char
expect("\
".length).toBe(0);
expect("\
").toBe("");
// ^ That's a U+2028 LINE SEPARATOR UTF-16 char
expect("\\
".length).toBe(2);
expect("\\
").toBe("\\\u2028");
// ^ That's a U+2028 LINE SEPARATOR UTF-16 char
expect("\\\
".length).toBe(1);
expect("\\\
").toBe("\\");
// ^ That's a U+2028 LINE SEPARATOR UTF-16 char
expect("\\\\
".length).toBe(3);
expect("\\\\
").toBe("\\\\\u2028");
// ^ That's a U+2028 LINE SEPARATOR UTF-16 char