Fix copy comments for Folded style scalar nodes

This commit is contained in:
Phani Teja Marupaka
2020-06-26 12:22:08 -07:00
parent 85e9fa94b0
commit 600d4f2c0b
2 changed files with 33 additions and 1 deletions

View File

@@ -286,6 +286,29 @@ apiVersion: apps/v1
kind: Deployment
items:
- a # comment
`,
},
{
name: "copy_comments_folded_style",
from: `
apiVersion: v1
kind: ConfigMap
data:
somekey: "012345678901234567890123456789012345678901234567890123456789012345678901234" # x
`,
to: `
apiVersion: v1
kind: ConfigMap
data:
somekey: >-
012345678901234567890123456789012345678901234567890123456789012345678901234
`,
expected: `
apiVersion: v1
kind: ConfigMap
data:
somekey: "012345678901234567890123456789012345678901234567890123456789012345678901234" # x
`,
},
}