Skip to content

Commit

Permalink
Remove superfluous testcases
Browse files Browse the repository at this point in the history
  • Loading branch information
mrueg committed Sep 28, 2024
1 parent dc88421 commit d5c41f6
Show file tree
Hide file tree
Showing 17 changed files with 19 additions and 257 deletions.
23 changes: 19 additions & 4 deletions markdown/markdown_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func TestCompileMarkdownDropH1(t *testing.T) {

test := assert.New(t)

testcases, err := filepath.Glob("testdata/*.md")
testcases, err := filepath.Glob("testdata/*.md")
if err != nil {
panic(err)
}
Expand All @@ -76,7 +76,14 @@ func TestCompileMarkdownDropH1(t *testing.T) {
if err != nil {
panic(err)
}
markdown, htmlname, html := loadData(t, filename, "-droph1")
var variant string
switch filename {
case "testdata/quotes.md", "testdata/header.md":
variant = "-droph1"
default:
variant = ""
}
markdown, htmlname, html := loadData(t, filename, variant)
actual, _ := CompileMarkdown(markdown, lib, filename, "", 1.0, true, false)
test.EqualValues(string(html), actual, filename+" vs "+htmlname)
}
Expand All @@ -92,7 +99,7 @@ func TestCompileMarkdownStripNewlines(t *testing.T) {

test := assert.New(t)

testcases, err := filepath.Glob("testdata/*.md")
testcases, err := filepath.Glob("testdata/*.md")
if err != nil {
panic(err)
}
Expand All @@ -102,7 +109,15 @@ func TestCompileMarkdownStripNewlines(t *testing.T) {
if err != nil {
panic(err)
}
markdown, htmlname, html := loadData(t, filename, "-stripnewlines")
var variant string
switch filename {
case "testdata/quotes.md", "testdata/codes.md", "testdata/newlines.md", "testdata/macro-include.md":
variant = "-stripnewlines"
default:
variant = ""
}

markdown, htmlname, html := loadData(t, filename, variant)
actual, _ := CompileMarkdown(markdown, lib, filename, "", 1.0, false, true)
test.EqualValues(string(html), actual, filename+" vs "+htmlname)
}
Expand Down
20 changes: 0 additions & 20 deletions testdata/codes-droph1.html

This file was deleted.

7 changes: 0 additions & 7 deletions testdata/header-stripnewlines.html

This file was deleted.

1 change: 0 additions & 1 deletion testdata/issue-64-broken-link-droph1.html

This file was deleted.

1 change: 0 additions & 1 deletion testdata/issue-64-broken-link-stripnewlines.html

This file was deleted.

21 changes: 0 additions & 21 deletions testdata/links-droph1.html

This file was deleted.

21 changes: 0 additions & 21 deletions testdata/links-stripnewlines.html

This file was deleted.

21 changes: 0 additions & 21 deletions testdata/lists-droph1.html

This file was deleted.

21 changes: 0 additions & 21 deletions testdata/lists-stripnewlines.html

This file was deleted.

26 changes: 0 additions & 26 deletions testdata/macro-include-droph1.html

This file was deleted.

10 changes: 0 additions & 10 deletions testdata/newlines-droph1.html

This file was deleted.

18 changes: 0 additions & 18 deletions testdata/pagelayout-droph1.html

This file was deleted.

18 changes: 0 additions & 18 deletions testdata/pagelayout-stripnewlines.html

This file was deleted.

28 changes: 0 additions & 28 deletions testdata/table-droph1.html

This file was deleted.

28 changes: 0 additions & 28 deletions testdata/table-stripnewlines.html

This file was deleted.

6 changes: 0 additions & 6 deletions testdata/tags-droph1.html

This file was deleted.

6 changes: 0 additions & 6 deletions testdata/tags-stripnewlines.html

This file was deleted.

0 comments on commit d5c41f6

Please sign in to comment.