コード例 #1
0
  @Test
  public void objectsWithHangingIndent() {
    buf.appendHangingIndent("aaa\nbbb\nccc");

    result += "aaa\n";
    result += "  bbb\n";
    result += "  ccc";

    assertEquals(result, buf.toString());

    buf.appendHangingIndent("ddd\neee\n");

    result += "\n";
    result += "ddd\n";
    result += "  eee\n";

    assertEquals(result, buf.toString());
  }
コード例 #2
0
 @Test
 public void objectsWithHangingIndent2() {
   buf.appendHangingIndent("\n");
   assertEquals("\n", buf.toString());
 }