Changeset View
Changeset View
Standalone View
Standalone View
src/parser/__tests__/ArcanistDiffParserTestCase.php
Show First 20 Lines • Show All 604 Lines • ▼ Show 20 Lines | EOTEXT | ||||
case 'git-remove-spaces.gitdiff': | case 'git-remove-spaces.gitdiff': | ||||
$this->assertEqual(1, count($changes)); | $this->assertEqual(1, count($changes)); | ||||
$change = array_shift($changes); | $change = array_shift($changes); | ||||
$this->assertEqual('file with spaces.txt', $change->getOldPath()); | $this->assertEqual('file with spaces.txt', $change->getOldPath()); | ||||
break; | break; | ||||
default: | default: | ||||
throw new Exception(pht('No test block for diff file %s.', $diff_file)); | throw new Exception(pht('No test block for diff file %s.', $diff_file)); | ||||
break; | |||||
} | } | ||||
} | } | ||||
public function testGitCommonFilenameExtraction() { | public function testGitCommonFilenameExtraction() { | ||||
static $tests = array( | static $tests = array( | ||||
'a/filename.c b/filename.c' => 'filename.c', | 'a/filename.c b/filename.c' => 'filename.c', | ||||
"a/filename.c b/filename.c\n" => 'filename.c', | "a/filename.c b/filename.c\n" => 'filename.c', | ||||
"a/filename.c b/filename.c\r\n" => 'filename.c', | "a/filename.c b/filename.c\r\n" => 'filename.c', | ||||
▲ Show 20 Lines • Show All 103 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0