\documentclass{book}

\begin{document}

\section{Section test}

Sectioning commands should be moved to their own lines.
\subsection{Result} Even if there is more than one.
\subsection{Result 2}

Also
\section*{A} unnumbered sectioning commands
\subsection*{B} should be split onto their own lines, even if there
\subsubsection*{C} is more than one.

All of this
\part{D} should also hold
\part*{E} for parts
\chapter{F} and chapters
\chapter*{G}.

\end{document}
