add a very basic test
This commit is contained in:
parent
4139190fc5
commit
e544d5ae1d
2 changed files with 18 additions and 0 deletions
3
Makefile
3
Makefile
|
@ -6,3 +6,6 @@ honk: *.go
|
|||
|
||||
clean:
|
||||
rm -f honk
|
||||
|
||||
test:
|
||||
go test
|
||||
|
|
15
fun_test.go
Normal file
15
fun_test.go
Normal file
|
@ -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)
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue