From 44374e37c0a604ef83394b000237ea9e3529c98d Mon Sep 17 00:00:00 2001 From: Erica Z Date: Sun, 17 Oct 2021 19:09:01 +0200 Subject: [PATCH] Add (failing) tests for identification of Gemtext markup --- helpers/general_test.go | 1 + hugofs/files/classifier_test.go | 2 ++ markup/markup_test.go | 1 + 3 files changed, 4 insertions(+) diff --git a/helpers/general_test.go b/helpers/general_test.go index bfabcbef..43f762e7 100644 --- a/helpers/general_test.go +++ b/helpers/general_test.go @@ -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 { diff --git a/hugofs/files/classifier_test.go b/hugofs/files/classifier_test.go index 84036b87..f13a4cb8 100644 --- a/hugofs/files/classifier_test.go +++ b/hugofs/files/classifier_test.go @@ -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) } diff --git a/markup/markup_test.go b/markup/markup_test.go index 71d39075..61da9552 100644 --- a/markup/markup_test.go +++ b/markup/markup_test.go @@ -45,4 +45,5 @@ func TestConverterRegistry(t *testing.T) { checkName("pandoc") checkName("org") checkName("blackfriday") + checkName("gemtext") }