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) + } +}