summaryrefslogtreecommitdiffstats
path: root/services/gitdiff/gitdiff_test.go
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2022-01-20 18:46:10 +0100
committerGitHub <noreply@github.com>2022-01-20 18:46:10 +0100
commit54e9ee37a7a301dbe74d46fd3c87712e6120e9bf (patch)
tree1be12fb072625c1b896b9d72f7912b018aad502b /services/gitdiff/gitdiff_test.go
parent1d98d205f5825f40110e6628b61a97c91ac7f72d (diff)
downloadgitea-54e9ee37a7a301dbe74d46fd3c87712e6120e9bf.tar.gz
gitea-54e9ee37a7a301dbe74d46fd3c87712e6120e9bf.zip
format with gofumpt (#18184)
* gofumpt -w -l . * gofumpt -w -l -extra . * Add linter * manual fix * change make fmt
Diffstat (limited to 'services/gitdiff/gitdiff_test.go')
-rw-r--r--services/gitdiff/gitdiff_test.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/services/gitdiff/gitdiff_test.go b/services/gitdiff/gitdiff_test.go
index 57cbb74b22..d57a3e2aba 100644
--- a/services/gitdiff/gitdiff_test.go
+++ b/services/gitdiff/gitdiff_test.go
@@ -504,7 +504,7 @@ index 6961180..9ba1a00 100644
// Test max lines
diffBuilder := &strings.Builder{}
- var diff = `diff --git a/newfile2 b/newfile2
+ diff := `diff --git a/newfile2 b/newfile2
new file mode 100644
index 0000000..6bb8f39
--- /dev/null
@@ -594,7 +594,7 @@ index 0000000..6bb8f39
}
println(result)
- var diff2 = `diff --git "a/A \\ B" "b/A \\ B"
+ diff2 := `diff --git "a/A \\ B" "b/A \\ B"
--- "a/A \\ B"
+++ "b/A \\ B"
@@ -1,3 +1,6 @@
@@ -611,7 +611,7 @@ index 0000000..6bb8f39
}
println(result)
- var diff2a = `diff --git "a/A \\ B" b/A/B
+ diff2a := `diff --git "a/A \\ B" b/A/B
--- "a/A \\ B"
+++ b/A/B
@@ -1,3 +1,6 @@
@@ -628,7 +628,7 @@ index 0000000..6bb8f39
}
println(result)
- var diff3 = `diff --git a/README.md b/README.md
+ diff3 := `diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -1,3 +1,6 @@
@@ -665,6 +665,7 @@ func setupDefaultDiff() *Diff {
},
}
}
+
func TestDiff_LoadComments(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())