1
0
mirror of https://github.com/alecthomas/chroma.git synced 2025-02-21 19:06:18 +02:00
chroma/lexers/api_test.go
2017-09-19 14:15:33 +10:00

22 lines
508 B
Go

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