go-ethereum/internal/cli/markdown_test.go
Jerry a131e427f6 Automatically generate markdown pages from bor CLI
Adding a script that can automatically generate markdown pages from bor
CLI, so we can avoid copy-pasting helper strings whenever a flag is created,
deleted, or modified.

CLI docs could be generated with command `make docs`.
2022-05-09 17:10:36 +02:00

19 lines
271 B
Go

package cli
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestCodeBlock(t *testing.T) {
assert := assert.New(t)
lines := []string{
"abc",
"bcd",
}
expected := "```\n" + "abc\n" + "bcd\n" + "```"
assert.Equal(expected, CodeBlock(lines))
}