tartrazine/common_test.go

20 lines
390 B
Go
Raw Normal View History

2016-07-13 20:21:18 +00:00
package slinguist
import (
"testing"
. "gopkg.in/check.v1"
)
func Test(t *testing.T) { TestingT(t) }
type TSuite struct{}
var _ = Suite(&TSuite{})
2016-07-18 14:20:12 +00:00
func (s *TSuite) TestGetLanguage(c *C) {
c.Assert(GetLanguage("foo.py", []byte{}), Equals, "Python")
c.Assert(GetLanguage("foo.m", []byte(":- module")), Equals, "Mercury")
c.Assert(GetLanguage("foo.m", []byte{}), Equals, "Other")
}