d0e2977746
Line endings are now preserved during the diff parsing. When the diff is then rendered later on, we replace non-printable characters by their ordinal counterparts, so a user can easily grasp changes when a hunk comes with edits that might be invisible at first. The expected format for the diff test suite has changed from serialized PHP to var_export, which is easier readable, editable and understandable, while still keeping parsable as well. Support for old Macintosh line endings could not be added, mainly because modern SCMs do not support single \r in their unified diff output either and working around and parsing these "lines" would have been a major headache with not much outcome (given the fact that all Macs that have been sold since 2001 or 2002 have been BSD-based and as such used Unix line endings by default). This commit fixes issue 636.
45 lines
656 B
Plaintext
45 lines
656 B
Plaintext
<?php return array (
|
|
'b' =>
|
|
array (
|
|
'chunks' =>
|
|
array (
|
|
0 =>
|
|
array (
|
|
0 =>
|
|
array (
|
|
0 => '1',
|
|
1 => '1',
|
|
2 => "a\n",
|
|
),
|
|
1 =>
|
|
array (
|
|
0 => 2,
|
|
1 => '',
|
|
2 => "b\n",
|
|
),
|
|
2 =>
|
|
array (
|
|
0 => 3,
|
|
1 => '',
|
|
2 => "\n",
|
|
),
|
|
),
|
|
),
|
|
'chunks_def' =>
|
|
array (
|
|
0 =>
|
|
array (
|
|
0 =>
|
|
array (
|
|
0 => '1',
|
|
1 => '3',
|
|
),
|
|
1 =>
|
|
array (
|
|
0 => '1',
|
|
1 => 1,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
); |