use prometeu_compiler::compiler; use prometeu_compiler::compiler::ProjectConfig; use std::path::Path; #[test] fn test_compile_lua_hello() { let project_dir = Path::new("tests/golden/lua"); let cfg = ProjectConfig { script_fe: "lua".to_string(), entry: "hello.lua".to_string(), out: "out.pbc".to_string(), emit_disasm: false, emit_symbols: false, }; let result = compiler::compile(&cfg, project_dir); match result { Ok(unit) => { assert!(!unit.rom.is_empty()); } Err(e) => panic!("Compilation failed: {}", e), } } #[test] fn test_compile_ts_regression() { let cfg = ProjectConfig { script_fe: "ts".to_string(), entry: "main.ts".to_string(), out: "out.pbc".to_string(), emit_disasm: false, emit_symbols: false, }; let project_dir = Path::new("tests/golden/ts"); let result = compiler::compile(&cfg, project_dir); match result { Ok(unit) => { assert!(!unit.rom.is_empty()); } Err(e) => panic!("TS Compilation failed: {}", e), } }