blob: e04815fd70f8fab622708459cef540ba0107cb77 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
//go:build test
package pikdex
import (
"github.com/stretchr/testify/assert"
"testing"
)
func TestContentLines(t *testing.T) {
in := `asdf
hjkl`
result := contentLines(in)
assert.Equal(t, "asdf", "hjkl", result)
}
func TestContentLines_EmptyLine(t *testing.T) {
in := `asdf
hjkl`
result := contentLines(in)
assert.Equal(t, "asdf", "hjkl", result)
}
func TestContentLines_Empty(t *testing.T) {
in := ``
result := contentLines(in)
assert.Equal(t, nil, result)
}
func TestContentLines_Comment(t *testing.T) {
in := `
//aaa
asdf
# iuyyiuoui
hjkl`
result := contentLines(in)
assert.Equal(t, "asdf", "hjkl", result)
}
|