1 #![allow(clippy::type_complexity)] 2 3 mod bin; 4 #[path = "../src/bin/run-parser-test-suite.rs"] 5 #[allow(dead_code)] 6 mod run_parser_test_suite; 7 8 use std::path::Path; 9 test(id: &str)10fn test(id: &str) { 11 let dir = Path::new("tests") 12 .join("data") 13 .join("yaml-test-suite") 14 .join(id); 15 16 let output = bin::run( 17 env!("CARGO_BIN_EXE_run-parser-test-suite"), 18 run_parser_test_suite::unsafe_main, 19 &dir.join("in.yaml"), 20 ); 21 22 if output.success { 23 let stdout = String::from_utf8_lossy(&output.stdout); 24 let stderr = String::from_utf8_lossy(&output.stderr); 25 eprint!("{}", stdout); 26 eprint!("{}", stderr); 27 panic!("expected parse to fail"); 28 } 29 } 30 31 unsafe_libyaml_test_suite::test_parser_error!(); 32