mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-28 18:01:01 -06:00
ebcf7455eb
* Rename module name from "github.com/hashicorp/terraform" to "github.com/placeholderplaceholderplaceholder/opentf". Signed-off-by: Jakub Martin <kubam@spacelift.io> * Gofmt. Signed-off-by: Jakub Martin <kubam@spacelift.io> * Regenerate protobuf. Signed-off-by: Jakub Martin <kubam@spacelift.io> * Fix comments. Signed-off-by: Jakub Martin <kubam@spacelift.io> * Undo issue and pull request link changes. Signed-off-by: Jakub Martin <kubam@spacelift.io> * Undo comment changes. Signed-off-by: Jakub Martin <kubam@spacelift.io> * Fix comment. Signed-off-by: Jakub Martin <kubam@spacelift.io> * Undo some link changes. Signed-off-by: Jakub Martin <kubam@spacelift.io> * make generate && make protobuf Signed-off-by: Jakub Martin <kubam@spacelift.io> --------- Signed-off-by: Jakub Martin <kubam@spacelift.io>
34 lines
867 B
Go
34 lines
867 B
Go
// Copyright (c) HashiCorp, Inc.
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
package lang
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/placeholderplaceholderplaceholder/opentf/internal/lang/funcs"
|
|
)
|
|
|
|
func TestFunctionDescriptions(t *testing.T) {
|
|
scope := &Scope{
|
|
ConsoleMode: true,
|
|
}
|
|
// This will implicitly test the parameter description count since
|
|
// WithNewDescriptions will panic if the number doesn't match.
|
|
allFunctions := scope.Functions()
|
|
|
|
// plantimestamp isn't available with ConsoleMode: true
|
|
expectedFunctionCount := len(funcs.DescriptionList) - 1
|
|
|
|
if len(allFunctions) != expectedFunctionCount {
|
|
t.Errorf("DescriptionList length expected: %d, got %d", len(allFunctions), expectedFunctionCount)
|
|
}
|
|
|
|
for name := range allFunctions {
|
|
_, ok := funcs.DescriptionList[name]
|
|
if !ok {
|
|
t.Errorf("missing DescriptionList entry for function %q", name)
|
|
}
|
|
}
|
|
}
|