add the section-is-function case, tidy up tests