diff --git a/src/UglyToad.PdfPig.Tests/Fonts/Encodings/GlyphListTests.cs b/src/UglyToad.PdfPig.Tests/Fonts/Encodings/GlyphListTests.cs index 430299dd..14f4fc40 100644 --- a/src/UglyToad.PdfPig.Tests/Fonts/Encodings/GlyphListTests.cs +++ b/src/UglyToad.PdfPig.Tests/Fonts/Encodings/GlyphListTests.cs @@ -1,5 +1,6 @@ namespace UglyToad.PdfPig.Tests.Fonts.Encodings { + using System.Collections.Generic; using PdfPig.Fonts.Encodings; using Xunit; @@ -32,5 +33,38 @@ Assert.Equal("O", result); } + + [Fact] + public void UnicodeToNameNotDefined() + { + var list = new GlyphList(new Dictionary()); + + var result = list.UnicodeCodePointToName(120); + + Assert.Equal(".notdef", result); + } + + [Fact] + public void NameToUnicodeNull() + { + var list = new GlyphList(new Dictionary()); + + var result = list.NameToUnicode(null); + + Assert.Null(result); + } + + [Fact] + public void NameToUnicodeRemovesSuffix() + { + var list = new GlyphList(new Dictionary + { + {"Boris", "B"} + }); + + var result = list.NameToUnicode("Boris.Special"); + + Assert.Equal("B", result); + } } }