parent
271e7d98ce
commit
a320b1a2a6
@ -1,15 +0,0 @@
|
||||
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)
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestMarkitzero(t *testing.T) {
|
||||
input := `link to https://example.com/ with **bold** text`
|
||||
output := `link to <a class="mention u-url" href="https://example.com/">https://example.com/</a> with <b>bold</b> text`
|
||||
|
||||
result := markitzero(input)
|
||||
if result != output {
|
||||
t.Errorf("\nexpected:\n%s\noutput:\n%s", output, result)
|
||||
}
|
||||
}
|
Loading…
Reference in new issue