aboutsummaryrefslogtreecommitdiffstats
path: root/commands/bug/bug_comment_test.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2023-01-17 20:25:34 +0100
committerMichael Muré <batolettre@gmail.com>2023-01-17 22:04:34 +0100
commitf23a7f07cc9d7e9b9407e0fcb99de6904f1b52a8 (patch)
treeef4b86e5b4ea357f43685f58a9d2f19bac5e8b3a /commands/bug/bug_comment_test.go
parent9fc8dbf4e167ae3d3a5fd602df74645e07d79679 (diff)
downloadgit-bug-f23a7f07cc9d7e9b9407e0fcb99de6904f1b52a8.tar.gz
commands: remove compact style for "bug", as the width adaptive default renderer cover that usage
Diffstat (limited to 'commands/bug/bug_comment_test.go')
-rw-r--r--commands/bug/bug_comment_test.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/commands/bug/bug_comment_test.go b/commands/bug/bug_comment_test.go
index c1dc9952..5625f1be 100644
--- a/commands/bug/bug_comment_test.go
+++ b/commands/bug/bug_comment_test.go
@@ -2,7 +2,7 @@ package bugcmd
import (
"fmt"
- "io/ioutil"
+ "os"
"strings"
"testing"
"time"
@@ -10,7 +10,6 @@ import (
"github.com/stretchr/testify/require"
"github.com/MichaelMure/git-bug/commands/bug/testenv"
- "github.com/MichaelMure/git-bug/commands/cmdtest"
"github.com/MichaelMure/git-bug/commands/execenv"
)
@@ -143,7 +142,7 @@ func requireCommentsEqual(t *testing.T, golden string, env *execenv.Env) {
t.Log("Got here")
for i, comment := range comments {
fileName := fmt.Sprintf(goldenFilePattern, golden, i)
- require.NoError(t, ioutil.WriteFile(fileName, []byte(comment.message), 0644))
+ require.NoError(t, os.WriteFile(fileName, []byte(comment.message), 0644))
}
}
@@ -157,7 +156,7 @@ func requireCommentsEqual(t *testing.T, golden string, env *execenv.Env) {
require.Equal(t, date.Add(time.Duration(i)*time.Minute), comment.date)
fileName := fmt.Sprintf(goldenFilePattern, golden, i)
- exp, err := ioutil.ReadFile(fileName)
+ exp, err := os.ReadFile(fileName)
require.NoError(t, err)
require.Equal(t, strings.ReplaceAll(string(exp), "\r", ""), strings.ReplaceAll(comment.message, "\r", ""))
}