Add (failing) tests for identification of Gemtext markup

This commit is contained in:
Erica Z 2021-10-17 19:09:01 +02:00
parent bb05377033
commit 44374e37c0
3 changed files with 4 additions and 0 deletions

View File

@ -51,6 +51,7 @@ func TestResolveMarkup(t *testing.T) {
{"htm", "html"},
{"org", "org"},
{"excel", ""},
{"gmi", "gemtext"},
} {
result := spec.ResolveMarkup(this.in)
if result != this.expect {

View File

@ -26,8 +26,10 @@ func TestIsContentFile(t *testing.T) {
c.Assert(IsContentFile(filepath.FromSlash("my/file.md")), qt.Equals, true)
c.Assert(IsContentFile(filepath.FromSlash("my/file.ad")), qt.Equals, true)
c.Assert(IsContentFile(filepath.FromSlash("my/file.gmi")), qt.Equals, true)
c.Assert(IsContentFile(filepath.FromSlash("textfile.txt")), qt.Equals, false)
c.Assert(IsContentExt("md"), qt.Equals, true)
c.Assert(IsContentExt("gmi"), qt.Equals, true)
c.Assert(IsContentExt("json"), qt.Equals, false)
}

View File

@ -45,4 +45,5 @@ func TestConverterRegistry(t *testing.T) {
checkName("pandoc")
checkName("org")
checkName("blackfriday")
checkName("gemtext")
}