all repos — honk @ a9dfd9f24c316952dc6de514b24e722d1f093875

my fork of honk

add a very basic test
Ted Unangst tedu@tedunangst.com
Sun, 12 May 2019 10:02:44 -0400
commit

a9dfd9f24c316952dc6de514b24e722d1f093875

parent

3414d8e7eac4227a6ad8ae61280f379f8a3ecac2

2 files changed, 18 insertions(+), 0 deletions(-)

jump to
M MakefileMakefile

@@ -6,3 +6,6 @@ go build -mod=`ls -d vendor 2> /dev/null` -o honk

clean: rm -f honk + +test: + go test
A fun_test.go

@@ -0,0 +1,15 @@

+package main + +import ( + "testing" +) + +func TestObfusbreak(t *testing.T) { + input := `link to https://example.com/ with **bold** text` + output := `link to <a href="https://example.com/">https://example.com/</a> with <b>bold</b> text` + + tmp := obfusbreak(input) + if tmp != output { + t.Errorf("%s is not %s", tmp, output) + } +}