mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-12-16 11:52:58 +03:00
ae8de95d89
Merge in DNS/adguard-home from 2234-move-to-internal to master Squashed commit of the following: commit d26a288cabeac86f9483fab307677b1027c78524 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Oct 30 12:44:18 2020 +0300 * all: move internal Go packages to internal/ Closes #2234.
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)
|
|
}
|