more tests for good boy points, split entities into files
This commit is contained in:
20
main_test.go
20
main_test.go
@ -45,6 +45,16 @@ func TestLinkDescTag(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestLinkDescManyTagsSpaces(t *testing.T) {
|
||||
var message string = "** [[https://pleroma.social/announcements/feed.xml][Pleroma Social]] :software: :social: :cofe:"
|
||||
var expected string = "https://pleroma.social/announcements/feed.xml software social cofe # Pleroma Social"
|
||||
var result string = LexerTestWrapper(message, expected)
|
||||
if result != expected {
|
||||
LexerTestWrapperFail(expected, result)
|
||||
t.Fail()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func TestLinkDescNoTag(t *testing.T) {
|
||||
var message string = "** [[https://pleroma.social/announcements/feed.xml][Pleroma Social]]"
|
||||
@ -55,3 +65,13 @@ func TestLinkDescNoTag(t *testing.T) {
|
||||
t.Fail()
|
||||
}
|
||||
}
|
||||
|
||||
func TestLinkDescWithSymbols(t *testing.T) {
|
||||
var message string = "** [[https://pleroma.social/announcements/feed.xml][Pleroma Social [*Very Cool*]]] :software:"
|
||||
var expected string = "https://pleroma.social/announcements/feed.xml software # Pleroma Social [*Very Cool*]"
|
||||
var result string = LexerTestWrapper(message, expected)
|
||||
if result != expected {
|
||||
LexerTestWrapperFail(expected, result)
|
||||
t.Fail()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user