Skip to content

Commit

Permalink
use CHANGELOG.md instead of Gopkg.toml in completor tests
Browse files Browse the repository at this point in the history
  • Loading branch information
itchyny committed Oct 20, 2024
1 parent f8696bf commit f498478
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions cmdline/completor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func TestCompletorCompleteCommand(t *testing.T) {
func TestCompletorCompleteFilepath(t *testing.T) {
c := newCompletor(&mockFilesystem{}, nil)
cmdline := c.complete("new", true)
if expected := "new Gopkg.toml"; cmdline != expected {
if expected := "new CHANGELOG.md"; cmdline != expected {
t.Errorf("cmdline should be %q but got %q", expected, cmdline)
}
if expected := "new"; c.target != expected {
Expand Down Expand Up @@ -164,7 +164,7 @@ func TestCompletorCompleteFilepath(t *testing.T) {
}

cmdline = c.complete(cmdline, true)
if expected := "new Gopkg.toml"; cmdline != expected {
if expected := "new CHANGELOG.md"; cmdline != expected {
t.Errorf("cmdline should be %q but got %q", expected, cmdline)
}
if c.index != 0 {
Expand All @@ -190,8 +190,8 @@ func TestCompletorCompleteFilepath(t *testing.T) {
}

c.clear()
cmdline = c.complete("w Gopkg.to", true)
if expected := "w Gopkg.toml"; cmdline != expected {
cmdline = c.complete("w change", true)
if expected := "w CHANGELOG.md"; cmdline != expected {
t.Errorf("cmdline should be %q but got %q", expected, cmdline)
}
if expected := ""; c.target != expected {
Expand Down Expand Up @@ -227,7 +227,7 @@ func TestCompletorCompleteFilepath(t *testing.T) {

c.clear()
cmdline = c.complete("edit", true)
if expected := "edit Gopkg.toml"; cmdline != expected {
if expected := "edit CHANGELOG.md"; cmdline != expected {
t.Errorf("cmdline should be %q but got %q", expected, cmdline)
}
if expected := "edit"; c.target != expected {
Expand Down
2 changes: 1 addition & 1 deletion cmdline/filesystem_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ func createFileInfoList(infos []*mockFileInfo) []os.FileInfo {
func (f *mockFile) Readdir(_ int) ([]os.FileInfo, error) {
if f.path == "." {
return createFileInfoList([]*mockFileInfo{
{"CHANGELOG.md", false},
{"README.md", false},
{"Makefile", false},
{".gitignore", false},
{"Gopkg.toml", false},
{"editor", true},
{"cmdline", true},
{"buffer", true},
Expand Down

0 comments on commit f498478

Please sign in to comment.