Skip to content

Commit

Permalink
Backport ParseOptions reuse test in minimal form
Browse files Browse the repository at this point in the history
Originally introduced in ae68e82
  • Loading branch information
dekellum committed Feb 2, 2018
1 parent 5dcb5b7 commit cfe75b9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/unit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -493,3 +493,13 @@ fn test_log_syntax_violation_option() {
let violation = violation.take();
assert_eq!(violation, Some("expected //".to_string()));
}

#[test]
fn test_options_reuse() {
let options = Url::options();
let url = options.parse("http:////mozilla.org").unwrap();

let options = options.base_url(Some(&url));
let url = options.parse("/sub\\path").unwrap();
assert_eq!(url.as_str(), "http://mozilla.org/sub/path");
}

0 comments on commit cfe75b9

Please sign in to comment.