aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/zwobble/mammoth/tests/DocumentConverterTests.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/org/zwobble/mammoth/tests/DocumentConverterTests.java')
-rw-r--r--src/test/java/org/zwobble/mammoth/tests/DocumentConverterTests.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/java/org/zwobble/mammoth/tests/DocumentConverterTests.java b/src/test/java/org/zwobble/mammoth/tests/DocumentConverterTests.java
index a0c0a66..8024291 100644
--- a/src/test/java/org/zwobble/mammoth/tests/DocumentConverterTests.java
+++ b/src/test/java/org/zwobble/mammoth/tests/DocumentConverterTests.java
@@ -12,6 +12,7 @@ import java.util.List;
import static com.natpryce.makeiteasy.MakeItEasy.*;
import static org.hamcrest.MatcherAssert.assertThat;
+import static org.zwobble.mammoth.documents.VerticalAlignment.SUPERSCRIPT;
import static org.zwobble.mammoth.tests.DeepReflectionMatcher.deepEquals;
import static org.zwobble.mammoth.tests.documents.DocumentElementMakers.*;
import static org.zwobble.mammoth.util.MammothLists.list;
@@ -66,6 +67,13 @@ public class DocumentConverterTests {
deepEquals(list(Html.element("s", list(Html.text("Hello"))))));
}
+ @Test
+ public void superscriptRunsAreWrappedInSuperscriptTags() {
+ assertThat(
+ convertToHtml(make(a(RUN, with(VERTICAL_ALIGNMENT, SUPERSCRIPT), with(CHILDREN, list(new Text("Hello")))))),
+ deepEquals(list(Html.element("sup", list(Html.text("Hello"))))));
+ }
+
private List<HtmlNode> convertToHtml(DocumentElement element) {
return DocumentConverter.convertToHtml(element);