diff --git a/kustomize/kustomize_generator_whitebox_test.go b/kustomize/kustomize_generator_whitebox_test.go index 36104dbbf..8f9cf9c45 100644 --- a/kustomize/kustomize_generator_whitebox_test.go +++ b/kustomize/kustomize_generator_whitebox_test.go @@ -57,6 +57,11 @@ func TestScanManifests(t *testing.T) { "testdata/nokustomization/utf16le/secret.yaml", }, }, + { + name: "utf-16BE without BOM files - should be invalid", + base: "./testdata/nokustomization/utf16le-no-bom", + wantErr: true, + }, } for _, tt := range tests { diff --git a/kustomize/testdata/nokustomization/utf16le-no-bom/secret.yaml b/kustomize/testdata/nokustomization/utf16le-no-bom/secret.yaml new file mode 100644 index 000000000..0e933f61d Binary files /dev/null and b/kustomize/testdata/nokustomization/utf16le-no-bom/secret.yaml differ