Merge pull request #25725 from FGtatsuro/diff_heredoc_hyphen

Use valid heredoc begin symbol in diff output.
This commit is contained in:
Alisdair McDiarmid 2020-10-06 12:52:23 -04:00 committed by GitHub
commit eb873f5021
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -885,7 +885,7 @@ func (p *blockBodyDiffPrinter) writeValueDiff(old, new cty.Value, indent int, pa
break
}
p.buf.WriteString("<<~EOT")
p.buf.WriteString("<<-EOT")
if p.pathForcesNewResource(path) {
p.buf.WriteString(p.color.Color(forcesNewResourceCaption))
}

View File

@ -232,7 +232,7 @@ field
ExpectedOutput: ` # test_instance.example will be updated in-place
~ resource "test_instance" "example" {
~ id = "i-02ae66f368e8518a9" -> (known after apply)
~ more_lines = <<~EOT
~ more_lines = <<-EOT
original
- long
+ extremely long
@ -267,7 +267,7 @@ new line
ExpectedOutput: ` # test_instance.example will be updated in-place
~ resource "test_instance" "example" {
~ id = "i-02ae66f368e8518a9" -> (known after apply)
+ more_lines = <<~EOT
+ more_lines = <<-EOT
original
new line
EOT
@ -301,7 +301,7 @@ new line
ExpectedOutput: ` # test_instance.example must be replaced
-/+ resource "test_instance" "example" {
~ id = "i-02ae66f368e8518a9" -> (known after apply)
~ more_lines = <<~EOT # forces replacement
~ more_lines = <<-EOT # forces replacement
original
+ new line
EOT