github.com/pavlo67/common@v0.5.3/common/strlib/regexp_test.go (about)

     1  package strlib
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/stretchr/testify/require"
     7  )
     8  
     9  func TestSpaces(t *testing.T) {
    10  	original := "   a   b c    d "
    11  	expected := "a b c d"
    12  	require.Equal(t, expected, ReSpaces.ReplaceAllString(ReSpacesFin.ReplaceAllString(original, ""), " "))
    13  }