mirror of
https://github.com/ralsina/tartrazine.git
synced 2024-11-10 13:32:24 +00:00
c6d74bca66
fixed autogenerated comment changed constant types names GetLanguageByShebang doesn't print errors languageInfo struct change to have only necessary fields GetLanguageByShebang has a comment now
33 lines
783 B
Go
33 lines
783 B
Go
package slinguist
|
|
|
|
import . "gopkg.in/check.v1"
|
|
|
|
func (s *TSuite) TestGetLanguageType(c *C) {
|
|
langType := GetLanguageType("BestLanguageEver")
|
|
c.Assert(langType, Equals, Unknown)
|
|
|
|
langType = GetLanguageType("JSON")
|
|
c.Assert(langType, Equals, Data)
|
|
|
|
langType = GetLanguageType("COLLADA")
|
|
c.Assert(langType, Equals, Data)
|
|
|
|
langType = GetLanguageType("Go")
|
|
c.Assert(langType, Equals, Programming)
|
|
|
|
langType = GetLanguageType("Brainfuck")
|
|
c.Assert(langType, Equals, Programming)
|
|
|
|
langType = GetLanguageType("HTML")
|
|
c.Assert(langType, Equals, Markup)
|
|
|
|
langType = GetLanguageType("Sass")
|
|
c.Assert(langType, Equals, Markup)
|
|
|
|
langType = GetLanguageType("AsciiDoc")
|
|
c.Assert(langType, Equals, Prose)
|
|
|
|
langType = GetLanguageType("Textile")
|
|
c.Assert(langType, Equals, Prose)
|
|
}
|