MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / test_render_template

Function test_render_template

crates/opencode-command/src/lib.rs:334–342  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

332
333 #[test]
334 fn test_render_template() {
335 let registry = CommandRegistry::new();
336 let ctx = CommandContext::new(PathBuf::from("/tmp"))
337 .with_arguments(vec!["arg1".to_string(), "arg2".to_string()])
338 .with_variable("PROJECT".to_string(), "test-project".to_string());
339
340 let result = registry.render_template("Hello $1 and $2. Project: ${PROJECT}", ctx);
341 assert_eq!(result, "Hello arg1 and arg2. Project: test-project");
342 }
343}

Callers

nothing calls this directly

Calls 4

newFunction · 0.85
with_variableMethod · 0.80
with_argumentsMethod · 0.80
render_templateMethod · 0.80

Tested by

no test coverage detected