package shell import ( "testing" "github.com/stretchr/testify/suite" ) type UtilTest struct { suite.Suite } func (t *UtilTest) TestCountBackslashSuffixes() { three := []rune{'a', '\\', 'b', '\\', '\\', '\\'} t.Equal(3, countBackslashSuffixes(three)) six := []rune{'a', '\\', 'b', '\\', '\\', '\\', '\\', '\\', '\\'} t.Equal(6, countBackslashSuffixes(six)) zero := []rune{'a', '\\', 'b', '\\', '\\', '\\', 'c'} t.Equal(0, countBackslashSuffixes(zero)) } func TestUtilTest(t *testing.T) { suite.Run(t, new(UtilTest)) }