Skip to content

Commit cfe75b9

Browse files
committed
Backport ParseOptions reuse test in minimal form
Originally introduced in ae68e82
1 parent 5dcb5b7 commit cfe75b9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/unit.rs

+10
Original file line numberDiff line numberDiff line change
@@ -493,3 +493,13 @@ fn test_log_syntax_violation_option() {
493493
let violation = violation.take();
494494
assert_eq!(violation, Some("expected //".to_string()));
495495
}
496+
497+
#[test]
498+
fn test_options_reuse() {
499+
let options = Url::options();
500+
let url = options.parse("http:////mozilla.org").unwrap();
501+
502+
let options = options.base_url(Some(&url));
503+
let url = options.parse("/sub\\path").unwrap();
504+
assert_eq!(url.as_str(), "http://mozilla.org/sub/path");
505+
}

0 commit comments

Comments
 (0)