layout: Respect margins

This commit is contained in:
Dorota Czaplejewicz
2019-12-15 18:39:49 +00:00
parent 5e700219f9
commit 257b97e9ca
4 changed files with 141 additions and 13 deletions

View File

@ -850,4 +850,21 @@ mod tests {
},
);
}
#[test]
fn test_layout_margins() {
let out = Layout::from_file(PathBuf::from("tests/layout_margins.yaml"))
.unwrap()
.build(PanicWarn).0
.unwrap();
assert_eq!(
out.margins,
layout::Margins {
top: 1.0,
bottom: 3.0,
left: 2.0,
right: 2.0,
}
);
}
}