public void TestTabStops() { FormatBuilder builder = new FormatBuilder(); builder .AppendLayout( 50, firstLineIndentSize: 1, tabStops: new[] { 6, 9, 20, 30, 40 }) .Append("A\tTab Stop\tAnother"); int position = 0; Assert.AreEqual(" A Tab Stop Another", builder.ToString(null, ref position)); Assert.AreEqual(27, position); Assert.AreEqual("A Tab Stop Another", builder.ToString(null, ref position)); Assert.AreEqual(47, position); }
public void TestTabStops() { FormatBuilder builder = new FormatBuilder(); builder .AppendLayout( 50, firstLineIndentSize: 1, tabStops: new[] {6, 9, 20, 30, 40}) .Append("A\tTab Stop\tAnother"); int position = 0; Assert.AreEqual(" A Tab Stop Another", builder.ToString(null, ref position)); Assert.AreEqual(27, position); Assert.AreEqual("A Tab Stop Another", builder.ToString(null, ref position)); Assert.AreEqual(47, position); }