Add test, fix line parse check (#3972)