MCPcopy
hub / github.com/hashicorp/hcl / TestTemplateExprWrappedGracefulValue

Function TestTemplateExprWrappedGracefulValue

hclsyntax/expression_template_test.go:452–461  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

450}
451
452func TestTemplateExprWrappedGracefulValue(t *testing.T) {
453 // we don't care about diags since we know it's invalid config
454 expr, _ := ParseTemplate([]byte(`${provider::}`), "", hcl.Pos{Line: 1, Column: 1, Byte: 0})
455
456 got, _ := expr.Value(nil) // this should not panic
457
458 if !got.RawEquals(cty.DynamicVal) {
459 t.Errorf("wrong result\ngot: %#v\nwant: %#v", got, cty.DynamicVal)
460 }
461}
462
463func TestTemplateExprIsStringLiteral(t *testing.T) {
464 tests := map[string]bool{

Callers

nothing calls this directly

Calls 2

ParseTemplateFunction · 0.85
ValueMethod · 0.65

Tested by

no test coverage detected