Skip to content

Commit

Permalink
comparer_test: add case to Test_writeToFileMissingTags
Browse files Browse the repository at this point in the history
  • Loading branch information
arxdsilva committed Mar 20, 2018
1 parent 50986a3 commit b6700cd
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions comparer/comparer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,11 @@ func Test_writeToFileMissingTags(t *testing.T) {
missingTags map[string]string
outdated bool
}
f, err := ioutil.TempFile("", "")
if err != nil {
t.Error(err)
}
defer os.Remove(f.Name())
tests := []struct {
name string
args args
Expand All @@ -255,11 +260,18 @@ func Test_writeToFileMissingTags(t *testing.T) {
wantErr: true,
},
{
name: "cant open invalid translation file",
name: "writes correctly tags and ignores if it's a commentary or doctype description",
args: args{
trltF: filepath.Join("testPaths", "Translation", "garen.txt"),
trltF: f.Name(),
missingTags: map[string]string{
fmt.Sprintf("<%v", pathSep): "",
"<!-": "",
"<ezreal>": "",
"<minerva>": "",
"<robo>": "",
},
},
wantErr: true,
wantErr: false,
},
}
for _, tt := range tests {
Expand Down

0 comments on commit b6700cd

Please sign in to comment.