mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-06-19 06:33:06 -03:00
data: fix getting the first line for empty content
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
This commit is contained in:
@ -8,6 +8,10 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestGetFirstLineEmptyContent(t *testing.T) {
|
||||
require.Nil(t, getFirstLine(nil))
|
||||
}
|
||||
|
||||
func TestForEachLine(t *testing.T) {
|
||||
const sample = "foo\nbar\nboomboom\nbleepbloop\n"
|
||||
var lines = strings.Split(sample, "\n")
|
||||
|
Reference in New Issue
Block a user