blob: 9c5bef18ecf032ad66ac6a0d7a9a876ce320a674 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
package validate
import (
"path/filepath"
"testing"
)
// TestShippedDataHasNoUnknownFields guards the authored content tree against
// misspelled or stale YAML keys: every data file is decoded with
// KnownFields(true), so an unread key (like the old exit-level
// set_player_flags or the legacy triggers key) fails CI instead of being
// silently discarded at load time.
func TestShippedDataHasNoUnknownFields(t *testing.T) {
dataDir := filepath.Join("..", "..", "data")
for _, issue := range validateKnownFields(dataDir) {
if issue.Level == "ERROR" {
t.Errorf("%s", issue.Message)
}
}
}
|