diff options
| author | Thibaut Horel <thibaut.horel@gmail.com> | 2016-02-28 11:25:23 -0500 |
|---|---|---|
| committer | Thibaut Horel <thibaut.horel@gmail.com> | 2016-02-28 11:25:23 -0500 |
| commit | 3f442a5cfa42488efd2d070fc1e0e2cd92289f81 (patch) | |
| tree | 0e79e497ba11f764ffe3e1048cbf73fd3f15349d /names_test.go | |
| parent | c4060f7d80fc3d24b9f5f31552a969d41b6b7b00 (diff) | |
| download | bibtex-3f442a5cfa42488efd2d070fc1e0e2cd92289f81.tar.gz | |
Latex sanitizing
Diffstat (limited to 'names_test.go')
| -rw-r--r-- | names_test.go | 17 |
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) + } + } + +} |
