mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
added test for https://github.com/servo/servo/issues/10548
This commit is contained in:
parent
317629d86e
commit
36eb25161d
2 changed files with 18 additions and 0 deletions
17
tests/unit/net/file_loader.rs
Normal file
17
tests/unit/net/file_loader.rs
Normal file
|
@ -0,0 +1,17 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use std::env;
|
||||
use url::Url;
|
||||
|
||||
#[test]
|
||||
fn load_htm() {
|
||||
let mut path = env::current_dir().expect("didn't get working dir");
|
||||
path.push("test.jpeg");
|
||||
|
||||
let canon_path = path.canonicalize().expect("file path doesn't exist");
|
||||
let url = Url::from_file_path(canon_path);
|
||||
|
||||
assert!(url.is_ok());
|
||||
}
|
|
@ -20,6 +20,7 @@ extern crate util;
|
|||
|
||||
#[cfg(test)] mod cookie;
|
||||
#[cfg(test)] mod data_loader;
|
||||
#[cfg(test)] mod file_loader;
|
||||
#[cfg(test)] mod fetch;
|
||||
#[cfg(test)] mod mime_classifier;
|
||||
#[cfg(test)] mod resource_thread;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue