Skip to content

Commit 1a83866

Browse files
committed
test: add test for LDIF folded comment
1 parent c1cf3b8 commit 1a83866

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

providers/directory/config_ldif_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,18 @@ func TestLdif_Parse(t *testing.T) {
110110
}, ld.Records[0])
111111
},
112112
},
113+
{
114+
name: "comment",
115+
input: "dn: dc=mokapi, dc=io\n# line 1\n line 2\nfoo: bar",
116+
test: func(t *testing.T, ld *Ldif, err error) {
117+
require.NoError(t, err)
118+
require.Len(t, ld.Records, 1)
119+
require.Equal(t, &AddRecord{
120+
Dn: "dc=mokapi, dc=io",
121+
Attributes: map[string][]string{"foo": {"bar"}},
122+
}, ld.Records[0])
123+
},
124+
},
113125
{
114126
name: "version set",
115127
input: "version: 1\ndn: dc=mokapi, dc=io",

0 commit comments

Comments
 (0)