mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-29 16:13:47 +00:00
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`.
19 lines
271 B
Go
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))
|
|
}
|