зеркало из https://github.com/mozilla/gecko-dev.git
servo: Merge #19527 - Fix running `cargo test` at the repository root (from servo:root); r=SimonSapin
Source-Repo: https://github.com/servo/servo Source-Revision: 8a8c06ac7b77ca1199c778f2ab6f1c27d88a340a --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : 9788f0e00ebfa0724aa3d910efda8dcb367969c7
This commit is contained in:
Родитель
7476fde1a0
Коммит
7412becfe8
|
@ -10,7 +10,7 @@ use std::process::Command;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn properties_list_json() {
|
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");
|
let json = top.join("target").join("doc").join("servo").join("css-properties.json");
|
||||||
if json.exists() {
|
if json.exists() {
|
||||||
remove_file(&json).unwrap()
|
remove_file(&json).unwrap()
|
||||||
|
@ -24,7 +24,7 @@ fn properties_list_json() {
|
||||||
.arg("regular")
|
.arg("regular")
|
||||||
.status()
|
.status()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
assert!(status.success());
|
assert!(status.success(), "{:?}", status);
|
||||||
|
|
||||||
let properties: Value = serde_json::from_reader(File::open(json).unwrap()).unwrap();
|
let properties: Value = serde_json::from_reader(File::open(json).unwrap()).unwrap();
|
||||||
assert!(properties.as_object().unwrap().len() > 100);
|
assert!(properties.as_object().unwrap().len() > 100);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче