diff options
| author | Paul Buetow <paul@buetow.org> | 2024-10-19 21:02:14 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2024-10-19 21:02:14 +0300 |
| commit | e02dcb943263da2fa701a7aba96b5dc41c14ffe0 (patch) | |
| tree | ca34f499a37f39a65bb239f632057698141e1dec /internal/platforms/linkedin/escapes_test.go | |
| parent | c072a8a06c9634948497f4ef5e69b832c80be195 (diff) | |
fix linkedin escapes
Diffstat (limited to 'internal/platforms/linkedin/escapes_test.go')
| -rw-r--r-- | internal/platforms/linkedin/escapes_test.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/internal/platforms/linkedin/escapes_test.go b/internal/platforms/linkedin/escapes_test.go new file mode 100644 index 0000000..b1f9203 --- /dev/null +++ b/internal/platforms/linkedin/escapes_test.go @@ -0,0 +1,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) + } +} |
