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