New tests covering INPUT_NEED_NL flag handling.  One exposes a bug.