aboutsummaryrefslogtreecommitdiffstats
path: root/worktree_test.go
diff options
context:
space:
mode:
authoronee-only <kimww0306@gmail.com>2024-04-11 23:40:21 +0900
committeronee-only <kimww0306@gmail.com>2024-04-11 23:40:21 +0900
commit63a48ce846d316f8689e367e884069944c0e4831 (patch)
tree0d94fd84dbe7ed401b19faac39d19b813ed49dec /worktree_test.go
parentcd6633c3c665ba37f766e96c59c57c58051d0e58 (diff)
downloadgo-git-63a48ce846d316f8689e367e884069944c0e4831.tar.gz
git: Refine some codes in test and non-test.
Diffstat (limited to 'worktree_test.go')
-rw-r--r--worktree_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/worktree_test.go b/worktree_test.go
index 668c30a..f67cca2 100644
--- a/worktree_test.go
+++ b/worktree_test.go
@@ -4,7 +4,6 @@ import (
"bytes"
"context"
"errors"
- "fmt"
"io"
"os"
"path/filepath"
@@ -1241,6 +1240,7 @@ func (s *WorktreeSuite) TestResetHardWithGitIgnore(c *C) {
f, err := fs.Create(".gitignore")
c.Assert(err, IsNil)
_, err = f.Write([]byte("foo\n"))
+ c.Assert(err, IsNil)
_, err = f.Write([]byte("newTestFile.txt\n"))
c.Assert(err, IsNil)
err = f.Close()
@@ -2982,7 +2982,7 @@ func TestValidPath(t *testing.T) {
}
for _, tc := range tests {
- t.Run(fmt.Sprintf("%s", tc.path), func(t *testing.T) {
+ t.Run(tc.path, func(t *testing.T) {
err := validPath(tc.path)
if tc.wantErr {
assert.Error(t, err)
@@ -3013,7 +3013,7 @@ func TestWindowsValidPath(t *testing.T) {
}
for _, tc := range tests {
- t.Run(fmt.Sprintf("%s", tc.path), func(t *testing.T) {
+ t.Run(tc.path, func(t *testing.T) {
got := windowsValidPath(tc.path)
assert.Equal(t, tc.want, got)
})