summaryrefslogtreecommitdiff
path: root/internal/platforms/linkedin/escapes_test.go
blob: 946125e26a9e188468a55b97b5e24643a5a349db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package linkedin

import (
	"testing"
)

func TestLinkedInEscapes(t *testing.T) {
	var (
		input    = `This is a test message with special characters: " {} @ [] () <> # \ * _ ~ |`
		expected = `This is a test message with special characters: " \{\} @ \[\] \(\) \<\> # \\ \* \_ \~ \|`
	)
	if escaped := escapeLinkedInText(input); escaped != expected {
		t.Errorf("expected '%s' but got '%s'", expected, escaped)
	}
}