tests: modernise style: more uses of test_line_count