MCPcopy Index your code
hub / github.com/PowerShell/DSC / valid_variable

Function valid_variable

lib/dsc-lib/src/functions/variables.rs:58–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56
57 #[test]
58 fn valid_variable() {
59 let mut parser = Statement::new().unwrap();
60 let mut context = Context::new();
61 context.variables.insert("hello".to_string(), "world".into());
62 let result = parser.parse_and_execute("[variables('hello')]", &context).unwrap();
63 assert_eq!(result, "world");
64 }
65
66 #[test]
67 fn invalid_resourceid() {

Callers

nothing calls this directly

Calls 2

parse_and_executeMethod · 0.80
newFunction · 0.50

Tested by

no test coverage detected