mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-14 10:30:59 +00:00
add test for multibyte string
This commit is contained in:
32
api/krusty/multibytecharacter_test.go
Normal file
32
api/krusty/multibytecharacter_test.go
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
package krusty_test
|
||||||
|
|
||||||
|
import (
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
kusttest_test "sigs.k8s.io/kustomize/api/testutils/kusttest"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestMultibyteCharInConfigMap(t *testing.T) {
|
||||||
|
th := kusttest_test.MakeHarness(t)
|
||||||
|
th.WriteK(".", `
|
||||||
|
resources:
|
||||||
|
- resources.yaml
|
||||||
|
`)
|
||||||
|
th.WriteF("resources.yaml", `
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: game-config
|
||||||
|
data:
|
||||||
|
key: あ
|
||||||
|
`)
|
||||||
|
m := th.Run(".", th.MakeDefaultOptions())
|
||||||
|
th.AssertActualEqualsExpected(m, `
|
||||||
|
apiVersion: v1
|
||||||
|
data:
|
||||||
|
key: あ
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: game-config
|
||||||
|
`)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user