1
0
mirror of https://github.com/alecthomas/chroma.git synced 2025-01-28 03:29:41 +02:00
chroma/lexers/api_test.go
2017-09-29 21:59:52 +10:00

22 lines
530 B
Go

package lexers_test
import (
"io/ioutil"
"testing"
"github.com/alecthomas/assert"
"github.com/alecthomas/chroma/formatters"
"github.com/alecthomas/chroma/lexers"
"github.com/alecthomas/chroma/styles"
)
func TestCompileAllRegexes(t *testing.T) {
for _, lexer := range lexers.Registry.Lexers {
it, err := lexer.Tokenise(nil, "")
assert.NoError(t, err, "%s failed", lexer.Config().Name)
err = formatters.NoOp.Format(ioutil.Discard, styles.SwapOff, it)
assert.NoError(t, err, "%s failed", lexer.Config().Name)
}
}