Tests the provided script and returns the result. An optional context can be provided.
(script: &str, ctx: Option<Context>)
| 229 | |
| 230 | /// Tests the provided script and returns the result. An optional context can be provided. |
| 231 | pub(crate) fn test_script(script: &str, ctx: Option<Context>) -> ResolveResult { |
| 232 | let program = match Program::compile(script) { |
| 233 | Ok(p) => p, |
| 234 | Err(e) => panic!("{}", e), |
| 235 | }; |
| 236 | program.execute(&ctx.unwrap_or_default()) |
| 237 | } |
| 238 | |
| 239 | #[test] |
| 240 | fn parse() { |
no test coverage detected