public void OverlyLongLinesWithLeadingZeroWidth() { var @out = new AppendableStringBuilder(); var lineWrapper = new LineWrapper(@out, " ", 10); lineWrapper.ZeroWidthSpace(2); lineWrapper.Append("abcdefghijkl"); lineWrapper.Close(); Assert.AreEqual("abcdefghijkl", @out.ToString()); }
public void NospaceWrapMax() { var @out = new AppendableStringBuilder(); var lineWrapper = new LineWrapper(@out, " ", 10); lineWrapper.Append("abcde"); lineWrapper.ZeroWidthSpace(2); lineWrapper.Append("fghijk"); lineWrapper.Close(); Assert.AreEqual("abcde\n fghijk", @out.ToString()); }
public void wrapEmbeddedNewlines_ZeroWidth() { var @out = new AppendableStringBuilder(); var lineWrapper = new LineWrapper(@out, " ", 10); lineWrapper.Append("abcde"); lineWrapper.ZeroWidthSpace(2); lineWrapper.Append("fghijk\nlmn"); lineWrapper.Append("opqrstuvwxy"); lineWrapper.Close(); Assert.AreEqual("abcde\n fghijk\nlmnopqrstuvwxy", @out.ToString()); }
public void FencepostZeroWidth() { var @out = new AppendableStringBuilder(); var lineWrapper = new LineWrapper(@out, " ", 10); lineWrapper.Append("abcde"); lineWrapper.Append("fghij"); lineWrapper.ZeroWidthSpace(2); lineWrapper.Append("k"); lineWrapper.Append("lmnop"); lineWrapper.Close(); Assert.AreEqual("abcdefghij\n klmnop", @out.ToString()); }