aboutsummaryrefslogtreecommitdiffstats
path: root/components/config/tests/opts.rs
diff options
context:
space:
mode:
authorkingdido999 <kingdido999@gmail.com>2018-09-02 08:27:07 +0800
committerkingdido999 <kingdido999@gmail.com>2018-09-02 08:27:07 +0800
commitce41c95e05fe8ce473c7d17335677031a7072f72 (patch)
treebc908360ed5aeaa90e34870ed9fd8111936793b4 /components/config/tests/opts.rs
parentc8f3abfdbcdb8c70dc3bd073ab39d5a2a8d88e89 (diff)
downloadservo-ce41c95e05fe8ce473c7d17335677031a7072f72.tar.gz
servo-ce41c95e05fe8ce473c7d17335677031a7072f72.zip
Format components config #21373
Diffstat (limited to 'components/config/tests/opts.rs')
-rw-r--r--components/config/tests/opts.rs31
1 files changed, 24 insertions, 7 deletions
diff --git a/components/config/tests/opts.rs b/components/config/tests/opts.rs
index 53a049e103c..e2db853a991 100644
--- a/components/config/tests/opts.rs
+++ b/components/config/tests/opts.rs
@@ -24,7 +24,10 @@ fn test_argument_parsing() {
let url = parse_url_or_filename(fake_cwd, "file:///foo/bar.html").unwrap();
assert_eq!(url.scheme(), "file");
- assert_eq!(url.path_segments().unwrap().collect::<Vec<_>>(), ["foo", "bar.html"]);
+ assert_eq!(
+ url.path_segments().unwrap().collect::<Vec<_>>(),
+ ["foo", "bar.html"]
+ );
}
#[test]
@@ -34,7 +37,10 @@ fn test_file_path_parsing() {
let url = parse_url_or_filename(fake_cwd, "bar.html").unwrap();
assert_eq!(url.scheme(), "file");
- assert_eq!(url.path_segments().unwrap().collect::<Vec<_>>(), ["fake", "cwd", "bar.html"]);
+ assert_eq!(
+ url.path_segments().unwrap().collect::<Vec<_>>(),
+ ["fake", "cwd", "bar.html"]
+ );
}
#[test]
@@ -44,7 +50,10 @@ fn test_file_path_parsing() {
let url = parse_url_or_filename(fake_cwd, "bar.html").unwrap();
assert_eq!(url.scheme(), "file");
- assert_eq!(url.path_segments().unwrap().collect::<Vec<_>>(), ["C:", "fake", "cwd", "bar.html"]);
+ assert_eq!(
+ url.path_segments().unwrap().collect::<Vec<_>>(),
+ ["C:", "fake", "cwd", "bar.html"]
+ );
}
#[test]
@@ -57,16 +66,24 @@ fn test_argument_parsing_special() {
let url = parse_url_or_filename(fake_cwd, "file:///foo/bar?baz#buzz.html").unwrap();
assert_eq!(&*url.to_file_path().unwrap(), Path::new("/foo/bar"));
assert_eq!(url.scheme(), "file");
- assert_eq!(url.path_segments().unwrap().collect::<Vec<_>>(), ["foo", "bar"]);
+ assert_eq!(
+ url.path_segments().unwrap().collect::<Vec<_>>(),
+ ["foo", "bar"]
+ );
assert_eq!(url.query(), Some("baz"));
assert_eq!(url.fragment(), Some("buzz.html"));
// but not in file names.
let url = parse_url_or_filename(fake_cwd, "./bar?baz#buzz.html").unwrap();
- assert_eq!(&*url.to_file_path().unwrap(), Path::new("/fake/cwd/bar?baz#buzz.html"));
+ assert_eq!(
+ &*url.to_file_path().unwrap(),
+ Path::new("/fake/cwd/bar?baz#buzz.html")
+ );
assert_eq!(url.scheme(), "file");
- assert_eq!(url.path_segments().unwrap().collect::<Vec<_>>(),
- ["fake", "cwd", "bar%3Fbaz%23buzz.html"]);
+ assert_eq!(
+ url.path_segments().unwrap().collect::<Vec<_>>(),
+ ["fake", "cwd", "bar%3Fbaz%23buzz.html"]
+ );
assert_eq!(url.query(), None);
assert_eq!(url.fragment(), None);
}