()
| 22 | |
| 23 | #[test] |
| 24 | fn cli_suite() { |
| 25 | let cases: Vec<Case> = serde_json::from_str(include_str!("cli.json")).expect("cli.json parse"); |
| 26 | let bin = env!("CARGO_BIN_EXE_edge"); |
| 27 | let mut failed = vec![]; |
| 28 | for c in &cases { |
| 29 | if let Err(e) = check(bin, c) { failed.push(format!("[edge {}] {e}", c.run.join(" "))); } |
| 30 | } |
| 31 | assert!(failed.is_empty(), "\n{}", failed.join("\n")); |
| 32 | } |
| 33 | |
| 34 | fn check(bin: &str, c: &Case) -> Result<(), String> { |
| 35 | let dir = tempfile::tempdir().map_err(|e| e.to_string())?; |