     # Consistent formatting
     assert render(nest("a", 1), 80) == "a"
     assert render(nest(glue("a", "b"), 1), 2) == "a\n b"
+    assert render(nest(line("a", "b"), 1), 20) == "a\n b"
+  end
+
+  test "break nest doc" do
+    # Consistent with definitions
+    assert nest(empty(), 1, :break) == {:doc_nest, empty(), 1, :break}
+    assert nest(empty(), 0, :break) == :doc_nil
+
+    # Wrong argument type
+    assert_raise FunctionClauseError, fn -> nest("foo", empty(), :break) end
+
+    # Consistent formatting
+    assert render(nest("a", 1, :break), 80) == "a"
+    assert render(nest(glue("a", "b"), 1, :break), 2) == "a\n b"
+    assert render(nest(line("a", "b"), 1, :break), 20) == "a\nb"
+  end
+
+  test "cursor nest doc" do
+    # Consistent with definitions
+    assert nest(empty(), :cursor) == {:doc_nest, empty(), :cursor, :always}
+
+    # Consistent formatting
+    assert render(nest("a", :cursor), 80) == "a"
+    assert render(concat("prefix ", nest(glue("a", "b"), :cursor)), 2) == "prefix a\n       b"
+    assert render(concat("prefix ", nest(line("a", "b"), :cursor)), 2) == "prefix a\n       b"
+  end
+
+  test "reset nest doc" do
+    # Consistent with definitions
+    assert nest(empty(), :cursor) == {:doc_nest, empty(), :cursor, :always}
+
+    # Consistent formatting
+    assert render(nest("a", :cursor), 80) == "a"
+    assert render(nest(nest(glue("a", "b"), :reset), 10), 2) == "a\nb"
+    assert render(nest(nest(line("a", "b"), :reset), 10), 2) == "a\nb"
   end
 
   test "color doc" do

    assert render(empty(), 80) == ""
  end

  test "break doc" do
    # Consistent with definitions
    assert break("break") == {:doc_break, "break", :strict}
    assert break("") == {:doc_break, "", :strict}


  test "group doc" do
    # Consistent with definitions
    assert group("ab") == {:doc_group, "ab"}
    assert group(empty()) == {:doc_group, empty()}

    # Consistent formatting
