Added all the necessary to do GetLanguageByAlias functionality works

This commit is contained in:
Manuel Carmona
2017-05-04 15:03:54 +02:00
parent 6f3ad6d30d
commit 45314b4903
11 changed files with 864 additions and 8 deletions

View File

@ -53,6 +53,12 @@ const (
filenamesGold = "test_files/filenames.gold"
filenamesTestTmplPath = "../assets/filenames.go.tmpl"
filenamesTestTmplName = "filenames.go.tmpl"
// Aliases test
aliasesTestFile = "test_files/aliases.test.yml"
aliasesGold = "test_files/aliases.gold"
aliasesTestTmplPath = "../assets/aliases.go.tmpl"
aliasesTestTmplName = "aliases.go.tmpl"
)
func TestFromFile(t *testing.T) {
@ -128,6 +134,15 @@ func TestFromFile(t *testing.T) {
generate: Filenames,
wantOut: filenamesGold,
},
{
name: "TestFromFile_Aliases",
fileToParse: aliasesTestFile,
tmplPath: aliasesTestTmplPath,
tmplName: aliasesTestTmplName,
commit: commitTest,
generate: Aliases,
wantOut: aliasesGold,
},
}
for _, tt := range tests {