diff --git a/modules/highlight/highlight_test.go b/modules/highlight/highlight_test.go index 3f47b6a48f65d..2f305bb589c93 100644 --- a/modules/highlight/highlight_test.go +++ b/modules/highlight/highlight_test.go @@ -40,20 +40,19 @@ steps: - go test -v -race -coverprofile=coverage.txt -covermode=atomic `, want: []string{ - `kind: pipeline`, - `name: default`, - ` -`, - `steps:`, - `- name: test`, - ` image: golang:1.13`, - ` environment:`, - ` GOPROXY: https://goproxy.cn`, - ` commands:`, - ` - go get -u`, - ` - go build -v`, - ` - go test -v -race -coverprofile=coverage.txt -covermode=atomic -`, + `kind: pipeline`, + `name: default`, + ``, + `steps:`, + `- name: test`, + ` image: golang:1.13`, + ` environment:`, + ` GOPROXY: https://goproxy.cn`, + ` commands:`, + ` - go get -u`, + ` - go build -v`, + ` - go test -v -race -coverprofile=coverage.txt -covermode=atomic +`, ` `, }, @@ -76,20 +75,19 @@ steps: - go test -v -race -coverprofile=coverage.txt -covermode=atomic `, want: []string{ - `kind: pipeline`, - `name: default `, - ` -`, - `steps:`, - `- name: test`, - ` image: golang:1.13`, - ` environment:`, - ` GOPROXY: https://goproxy.cn`, - ` commands:`, - ` - go get -u`, - ` - go build -v`, - ` - go test -v -race -coverprofile=coverage.txt -covermode=atomic`, - ` `, + `kind: pipeline`, + `name: default `, + ``, + `steps:`, + `- name: test`, + ` image: golang:1.13`, + ` environment:`, + ` GOPROXY: https://goproxy.cn`, + ` commands:`, + ` - go get -u`, + ` - go build -v`, + ` - go test -v -race -coverprofile=coverage.txt -covermode=atomic`, + ` `, }, }, } diff --git a/modules/markup/orgmode/orgmode_test.go b/modules/markup/orgmode/orgmode_test.go index 81d0d66a76c5b..38c010ef68d94 100644 --- a/modules/markup/orgmode/orgmode_test.go +++ b/modules/markup/orgmode/orgmode_test.go @@ -77,9 +77,9 @@ func HelloWorld() { } #+end_src `, `
-
// HelloWorld prints "Hello World"
-func HelloWorld() {
-	fmt.Println("Hello World")
-}
+
// HelloWorld prints "Hello World"
+func HelloWorld() {
+	fmt.Println("Hello World")
+}
`) } diff --git a/services/gitdiff/gitdiff_test.go b/services/gitdiff/gitdiff_test.go index b64ac092aadad..104df967885d5 100644 --- a/services/gitdiff/gitdiff_test.go +++ b/services/gitdiff/gitdiff_test.go @@ -715,7 +715,8 @@ func TestDiffToHTML_14231(t *testing.T) { diffRecord := diffMatchPatch.DiffMain(highlight.Code("main.v", "", " run()\n"), highlight.Code("main.v", "", " run(db)\n"), true) diffRecord = diffMatchPatch.DiffCleanupEfficiency(diffRecord) - expected := ` run(db)` + expected := ` run(db) +` output := diffToHTML("main.v", diffRecord, DiffLineAdd) assertEqual(t, expected, output.Content)