package testutil

import "github.com/yuin/goldmark/testutil"

Index

Functions

func DoTestCase

func DoTestCase(m goldmark.Markdown, testCase MarkdownTestCase, t TestingT)

DoTestCase runs a test case.

func DoTestCaseFile

func DoTestCaseFile(m goldmark.Markdown, filename string, t TestingT)

DoTestCaseFile runs test cases in a given file.

func DoTestCases

func DoTestCases(m goldmark.Markdown, cases []MarkdownTestCase, t TestingT)

DoTestCases runs a set of test cases.

Types

type MarkdownTestCase

type MarkdownTestCase struct {
	No       int
	Markdown string
	Expected string
}

MarkdownTestCase represents a test case.

type TestingT

type TestingT interface {
	Logf(string, ...interface{})
	Skipf(string, ...interface{})
	Errorf(string, ...interface{})
	FailNow()
}

TestingT is a subset of the functionality provided by testing.T.

Source Files

testutil.go

Version
v1.1.24
Published
Mar 1, 2020
Platform
linux/amd64
Imports
9 packages
Last checked
11 minutes ago

Tools for package owners.