diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2017-12-08 19:21:45 +0100 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2017-12-08 19:21:45 +0100 |
commit | 5034d1d7774eda6f8f3f9064d828b5b7c4c9f264 (patch) | |
tree | 9f7538583e66413ff887a606682e348cb4069390 /tests | |
parent | a8be1597c9d1b4d019ed93d68cc7fdfba8ca1f86 (diff) | |
download | servo-5034d1d7774eda6f8f3f9064d828b5b7c4c9f264.tar.gz servo-5034d1d7774eda6f8f3f9064d828b5b7c4c9f264.zip |
Fix running `cargo test` at the repository root
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/style/properties/scaffolding.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/unit/style/properties/scaffolding.rs b/tests/unit/style/properties/scaffolding.rs index b752937ad93..faa727ff613 100644 --- a/tests/unit/style/properties/scaffolding.rs +++ b/tests/unit/style/properties/scaffolding.rs @@ -10,7 +10,7 @@ use std::process::Command; #[test] fn properties_list_json() { - let top = Path::new(file!()).parent().unwrap().join("..").join("..").join("..").join(".."); + let top = Path::new(&env::var("CARGO_MANIFEST_DIR").unwrap()).join("..").join("..").join(".."); let json = top.join("target").join("doc").join("servo").join("css-properties.json"); if json.exists() { remove_file(&json).unwrap() @@ -24,7 +24,7 @@ fn properties_list_json() { .arg("regular") .status() .unwrap(); - assert!(status.success()); + assert!(status.success(), "{:?}", status); let properties: Value = serde_json::from_reader(File::open(json).unwrap()).unwrap(); assert!(properties.as_object().unwrap().len() > 100); |