parser.rs 568 B

123456789101112131415161718192021
  1. use log::error;
  2. use test_base::{
  3. test_context::{self as test_context, test_context},
  4. BaseTestContext,
  5. };
  6. const CONFIG_V1_DIR: &str = "tests/data/dadk_config_v1";
  7. #[test_context(BaseTestContext)]
  8. #[test]
  9. fn test_parser(ctx: &mut BaseTestContext) {
  10. let mut parser = dadk::parser::Parser::new(ctx.abs_path(CONFIG_V1_DIR));
  11. let result = parser.parse();
  12. let cwd = std::env::current_dir().unwrap();
  13. log::debug!("Current working directory: {:?}", cwd);
  14. if let Err(e) = result {
  15. error!("Error: {:?}", e);
  16. assert!(false);
  17. }
  18. }