We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be4809e commit 3222b34Copy full SHA for 3222b34
url/tests/unit.rs
@@ -533,13 +533,15 @@ fn test_origin_opaque() {
533
534
#[test]
535
fn test_origin_unicode_serialization() {
536
- let unicode_urls = [
537
- "http://😅.com",
538
- "ftp://🙂.com"
+ let data = [
+ ("http://😅.com", "http://😅.com"),
+ ("ftp://😅:🙂@🙂.com", "ftp://🙂.com"),
539
+ ("https://user@😅.com", "https://😅.com"),
540
+ ("http://😅.🙂:40", "http://😅.🙂:40")
541
];
- for unicode_url in &unicode_urls {
542
+ for &(unicode_url, expected_serialization) in &data {
543
let origin = Url::parse(unicode_url).unwrap().origin();
- assert_eq!(origin.unicode_serialization(), *unicode_url);
544
+ assert_eq!(origin.unicode_serialization(), *expected_serialization);
545
}
546
547
let ascii_origins = [
0 commit comments