Skip to content

Commit

Permalink
Add a test for servo#242
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonSapin committed Nov 22, 2016
1 parent c5dbeb5 commit 42921c8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/unit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ use std::net::{Ipv4Addr, Ipv6Addr};
use std::path::{Path, PathBuf};
use url::{Host, Url, form_urlencoded};

#[test]
fn size() {
use std::mem::size_of;
assert_eq!(size_of::<Url>(), size_of::<Option<Url>>());
}

macro_rules! assert_from_file_path {
($path: expr) => { assert_from_file_path!($path, $path) };
($path: expr, $url_path: expr) => {{
Expand Down Expand Up @@ -274,6 +280,11 @@ fn issue_197() {
url.path_segments_mut().expect("path_segments_mut").pop_if_empty();
}

#[test]
fn issue_241() {
Url::parse("mailto:").unwrap().cannot_be_a_base();
}

#[test]
/// https://github.com/servo/rust-url/issues/222
fn append_trailing_slash() {
Expand Down

0 comments on commit 42921c8

Please sign in to comment.