From 6ccee76621fcceaa05375ca296b2617d3e144e0d Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sat, 5 Aug 2023 16:53:22 +0200 Subject: [PATCH] Add a test for an invalid resource MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This one uses unassigned codepoints in Unicode 3.2. --- jid/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/jid/src/lib.rs b/jid/src/lib.rs index bf28db5..efecccf 100644 --- a/jid/src/lib.rs +++ b/jid/src/lib.rs @@ -880,6 +880,11 @@ mod tests { assert_eq!(full, equiv); } + #[test] + fn invalid_stringprep() { + FullJid::from_str("a@b/🎉").unwrap_err(); + } + #[test] fn jid_from_parts() { let node = NodePart::new("node").unwrap();