Unit tests for the toLine function