tartrazine/type_test.go

33 lines
783 B
Go
Raw Normal View History

2017-04-11 09:26:23 +00:00
package slinguist
import . "gopkg.in/check.v1"
func (s *TSuite) TestGetLanguageType(c *C) {
langType := GetLanguageType("BestLanguageEver")
c.Assert(langType, Equals, Unknown)
2017-04-11 09:26:23 +00:00
langType = GetLanguageType("JSON")
c.Assert(langType, Equals, Data)
2017-04-11 09:26:23 +00:00
langType = GetLanguageType("COLLADA")
c.Assert(langType, Equals, Data)
2017-04-11 09:26:23 +00:00
langType = GetLanguageType("Go")
c.Assert(langType, Equals, Programming)
2017-04-11 09:26:23 +00:00
langType = GetLanguageType("Brainfuck")
c.Assert(langType, Equals, Programming)
2017-04-11 09:26:23 +00:00
langType = GetLanguageType("HTML")
c.Assert(langType, Equals, Markup)
2017-04-11 09:26:23 +00:00
langType = GetLanguageType("Sass")
c.Assert(langType, Equals, Markup)
2017-04-11 09:26:23 +00:00
langType = GetLanguageType("AsciiDoc")
c.Assert(langType, Equals, Prose)
2017-04-11 09:26:23 +00:00
langType = GetLanguageType("Textile")
c.Assert(langType, Equals, Prose)
2017-04-11 09:26:23 +00:00
}