Exercise document-root controls through the public API
This commit is contained in:
@@ -74,10 +74,10 @@ func TestSourceVersionEvidenceConversion(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestImportSelectionConversion(t *testing.T) {
|
||||
file := writeRecordConfig(t, "configkit:\n imports:\n - glob: absent/*.yml\nvalue: main\n")
|
||||
file := writeRecordConfig(t, "config:\n imports:\n - glob: absent/*.yml\nvalue: main\n")
|
||||
internal := engineSourceInfoFromLoad(t, file, "source-1", engine.Options[recordConfig]{Imports: true})
|
||||
converted := fromEngineSourceInfo(internal)
|
||||
if len(converted.EmptyImportSelections) != 1 || converted.EmptyImportSelections[0].Path.String() != "/configkit/imports/0" ||
|
||||
if len(converted.EmptyImportSelections) != 1 || converted.EmptyImportSelections[0].Path.String() != "/config/imports/0" ||
|
||||
converted.EmptyImportSelections[0].Location.SourceID != internal.ID || converted.EmptyImportSelections[0].Location.Line != 3 ||
|
||||
converted.EmptyImportSelections[0].Selector != ImportSelectorGlob {
|
||||
t.Fatalf("converted selection evidence = %#v", converted.EmptyImportSelections)
|
||||
|
||||
Reference in New Issue
Block a user