mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-05-25 16:23:03 +02:00
Docs, still WIP
This commit is contained in:
parent
0eb511c714
commit
8900df27c9
6 changed files with 256 additions and 57 deletions
util
|
@ -152,3 +152,17 @@ func TestParseSize_FailureInvalid(t *testing.T) {
|
|||
t.Fatalf("expected error, but got none")
|
||||
}
|
||||
}
|
||||
|
||||
func TestSplitKV(t *testing.T) {
|
||||
key, value := SplitKV(" key = value ", "=")
|
||||
require.Equal(t, "key", key)
|
||||
require.Equal(t, "value", value)
|
||||
|
||||
key, value = SplitKV(" value ", "=")
|
||||
require.Equal(t, "", key)
|
||||
require.Equal(t, "value", value)
|
||||
|
||||
key, value = SplitKV("mykey=value=with=separator ", "=")
|
||||
require.Equal(t, "mykey", key)
|
||||
require.Equal(t, "value=with=separator", value)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue