From 226f700a3b91e60a01341f45c507861af592b9e7 Mon Sep 17 00:00:00 2001 From: Nordine Bittich Date: Sat, 30 Nov 2024 21:26:06 +0100 Subject: [PATCH] extra test --- src/iri.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/iri.rs b/src/iri.rs index 5bce42a..fc50f41 100644 --- a/src/iri.rs +++ b/src/iri.rs @@ -846,5 +846,17 @@ mod test { assert!(IRI::try_from("://example.com").is_err()); assert!(IRI::try_from("`http://example.com/").is_err()); assert!(IRI::try_from("http://example.com/\n/path").is_err()); + let iri = IRI::try_from("path/").unwrap(); + assert_eq!( + iri, + IRI::Reference(RelativeRef { + relative_part: RelativePart::NoScheme(IPath::NoScheme { + snz_nc: "path".into(), + segments: vec!["/".into(),], + },), + query: "".into(), + fragment: "".into(), + },) + ); } }