blob: 55b39227139ace0154f7e9c2125f9553fd9a9fed [file] [log] [blame]
package linenumbers
import (
"testing"
"github.com/stretchr/testify/assert"
"go.skia.org/infra/go/testutils/unittest"
)
func TestLineNumbers(t *testing.T) {
unittest.SmallTest(t)
code := `a
b
c`
want := `#line 1
a
#line 2
b
#line 3
c`
assert.Equal(t, want, LineNumbers(code))
code = ``
want = `#line 1
`
assert.Equal(t, want, LineNumbers(code))
}