|
|
|
@ -62,4 +62,14 @@ pub fn render(input: &str) -> Result<String> {
|
|
|
|
|
keyboard: serde_json::from_str(input)?,
|
|
|
|
|
};
|
|
|
|
|
Ok(document.render()?)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg(test)]
|
|
|
|
|
mod tests {
|
|
|
|
|
use super::render_file;
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn render() {
|
|
|
|
|
render_file("layout.json", "output.svg").unwrap();
|
|
|
|
|
}
|
|
|
|
|
}
|