Add (failing) tests for identification of Gemtext markup
This commit is contained in:
parent
bb05377033
commit
44374e37c0
|
@ -51,6 +51,7 @@ func TestResolveMarkup(t *testing.T) {
|
||||||
{"htm", "html"},
|
{"htm", "html"},
|
||||||
{"org", "org"},
|
{"org", "org"},
|
||||||
{"excel", ""},
|
{"excel", ""},
|
||||||
|
{"gmi", "gemtext"},
|
||||||
} {
|
} {
|
||||||
result := spec.ResolveMarkup(this.in)
|
result := spec.ResolveMarkup(this.in)
|
||||||
if result != this.expect {
|
if result != this.expect {
|
||||||
|
|
|
@ -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.md")), qt.Equals, true)
|
||||||
c.Assert(IsContentFile(filepath.FromSlash("my/file.ad")), 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(IsContentFile(filepath.FromSlash("textfile.txt")), qt.Equals, false)
|
||||||
c.Assert(IsContentExt("md"), qt.Equals, true)
|
c.Assert(IsContentExt("md"), qt.Equals, true)
|
||||||
|
c.Assert(IsContentExt("gmi"), qt.Equals, true)
|
||||||
c.Assert(IsContentExt("json"), qt.Equals, false)
|
c.Assert(IsContentExt("json"), qt.Equals, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,4 +45,5 @@ func TestConverterRegistry(t *testing.T) {
|
||||||
checkName("pandoc")
|
checkName("pandoc")
|
||||||
checkName("org")
|
checkName("org")
|
||||||
checkName("blackfriday")
|
checkName("blackfriday")
|
||||||
|
checkName("gemtext")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue