Allow line buffer to be injected into complete() for testing