mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-11-16 10:28:29 -07:00
15 lines
275 B
Go
15 lines
275 B
Go
|
package util
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"github.com/stretchr/testify/assert"
|
||
|
)
|
||
|
|
||
|
func TestSplitNext(t *testing.T) {
|
||
|
s := " a,b , c "
|
||
|
assert.True(t, SplitNext(&s, ',') == "a")
|
||
|
assert.True(t, SplitNext(&s, ',') == "b")
|
||
|
assert.True(t, SplitNext(&s, ',') == "c" && len(s) == 0)
|
||
|
}
|