github.com/palisadeinc/bor@v0.0.0-20230615125219-ab7196213d15/internal/cli/markdown_test.go (about)

     1  package cli
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/stretchr/testify/require"
     7  )
     8  
     9  func TestCodeBlock(t *testing.T) {
    10  	t.Parallel()
    11  	assert := require.New(t)
    12  
    13  	lines := []string{
    14  		"abc",
    15  		"bcd",
    16  	}
    17  
    18  	expected := "```\n" + "abc\n" + "bcd\n" + "```"
    19  	assert.Equal(expected, CodeBlock(lines))
    20  }