summaryrefslogtreecommitdiffstats
path: root/names_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'names_test.go')
-rw-r--r--names_test.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/names_test.go b/names_test.go
index ad8ba05..2d74f1c 100644
--- a/names_test.go
+++ b/names_test.go
@@ -124,3 +124,20 @@ func TestIsLower(t *testing.T) {
}
}
}
+
+func TestRemoveLatex(t *testing.T) {
+ tests := []struct {
+ s string
+ expected string
+ }{
+ {"\\' a\\OE{\\c {cd}}\\&{\\emph{test}}", "áŒç&test"},
+ }
+ for _, test := range tests {
+ actual := removeLatexCommands(test.s)
+ if test.expected != actual {
+ t.Errorf("%q, expected: %q, actual: %q", test.s,
+ test.expected, actual)
+ }
+ }
+
+}