Skip to content

Commit 90318d6

Browse files
add collapse testcase to cli
1 parent 395858e commit 90318d6

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

‎cli/cmd/cmd_convert.go‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ func (cli *CLI) convert(input []byte) ([]error, error) {
3030

3131
conv := converter.NewConverter(
3232
converter.WithPlugins(
33-
// TODO: there should be a golden file test for functionality that needs the base plugin
3433
base.NewBasePlugin(),
3534
commonmark.NewCommonmarkPlugin(
3635
commonmark.WithStrongDelimiter(cli.config.strongDelimiter),

‎cli/cmd/exec_test.go‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,18 @@ func TestExecute(t *testing.T) {
272272
inputArgs: []string{"html2markdown", `--opt-strong-delimiter`, `__`},
273273
},
274274
},
275+
{
276+
desc: "[convert] collapse",
277+
278+
input: CLIInput{
279+
modeStdin: modePipe,
280+
modeStdout: modePipe,
281+
modeStderr: modePipe,
282+
283+
inputStdin: []byte("<p>Some <strong> bold </strong> text</p>"),
284+
inputArgs: []string{"html2markdown"},
285+
},
286+
},
275287

276288
// - - - - - validation of options - - - - - //
277289
{

‎cli/cmd/testdata/TestExecute/[convert]_collapse/stderr.golden‎

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Some **bold** text

0 commit comments

Comments
 (0)