Extends
lithium\test\Unit
Tests reading specific line numbers of a file that has CRLF line endings.
Returns
voidSource
public function testLineIntrospectionWithCRLFLineEndings() {
$tmpPath = Libraries::get(true, 'resources') . '/tmp/tests/inspector_crlf';
$contents = implode("\r\n", array('one', 'two', 'three', 'four', 'five'));
file_put_contents($tmpPath, $contents);
$result = Inspector::lines($tmpPath, array(2));
$expected = array(2 => 'two');
$this->assertEqual($expected, $result);
$result = Inspector::lines($tmpPath, array(1,5));
$expected = array(1 => 'one', 5 => 'five');
$this->assertEqual($expected, $result);
$this->_cleanUp();
}