From e544d5ae1db4d6fa6f33c9f6281b293a5c00bf1b Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Sun, 12 May 2019 10:02:44 -0400 Subject: [PATCH] add a very basic test --- Makefile | 3 +++ fun_test.go | 15 +++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 fun_test.go diff --git a/Makefile b/Makefile index d158c58..621c782 100644 --- a/Makefile +++ b/Makefile @@ -6,3 +6,6 @@ honk: *.go clean: rm -f honk + +test: + go test diff --git a/fun_test.go b/fun_test.go new file mode 100644 index 0000000..49c6363 --- /dev/null +++ b/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 https://example.com/ with bold text` + + tmp := obfusbreak(input) + if tmp != output { + t.Errorf("%s is not %s", tmp, output) + } +}