test: fix platform-depenent paths in tests

Test Plan:
 - go test ./internal/code-generator/... -run Test_GeneratorTestSuite -testify.m TestGenerationFiles
This commit is contained in:
Alexander Bezzubov
2020-03-19 19:47:22 +01:00
parent e32a70a784
commit 1ab8148c10
2 changed files with 33 additions and 33 deletions

View File

@ -39,7 +39,7 @@ func (s *EnryTestSuite) TestRegexpEdgeCases() {
}
for _, r := range regexpEdgeCases {
filename := fmt.Sprintf("%s/samples/%s/%s", s.tmpLinguist, r.lang, r.filename)
filename := filepath.Join(s.tmpLinguist, "samples", r.lang, r.filename)
content, err := ioutil.ReadFile(filename)
require.NoError(s.T(), err)
@ -116,7 +116,7 @@ func (s *EnryTestSuite) TestGetLanguage() {
}
func (s *EnryTestSuite) TestGetLanguagesByModelineLinguist() {
var modelinesDir = filepath.Join(s.tmpLinguist, "test/fixtures/Data/Modelines")
var modelinesDir = filepath.Join(s.tmpLinguist, "test", "fixtures", "Data", "Modelines")
tests := []struct {
name string