diff options
| author | ewy <ewy0@protonmail.com> | 2026-06-01 18:47:44 +0200 |
|---|---|---|
| committer | ewy <ewy0@protonmail.com> | 2026-06-01 18:47:44 +0200 |
| commit | 46d032cd21b0e8e2c94a32333d3805ec76980cca (patch) | |
| tree | fbb8aed5c5a501aca1309f62a9d4440ca949ce4c /indexers/pikdex/meta_test.go | |
| parent | 7585a488b7b1e1812f7ebf50107139e2fd65f035 (diff) | |
add man(1) generation
Diffstat (limited to 'indexers/pikdex/meta_test.go')
| -rw-r--r-- | indexers/pikdex/meta_test.go | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/indexers/pikdex/meta_test.go b/indexers/pikdex/meta_test.go new file mode 100644 index 0000000..e04815f --- /dev/null +++ b/indexers/pikdex/meta_test.go @@ -0,0 +1,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) +} |
