1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-12-23 14:00:55 +01:00

Make arcanist lint tests flexible about testcase formatting

Summary:
We currently require an exact number of "~" characters, but this is needless and error-prone.

Instead, allow any number larger than 3.

Test Plan:
  - Added meta test-case.
  - Ran `arc unit --everything`.

Reviewers: btrahan, thoughtpolice

Reviewed By: thoughtpolice

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D10251
This commit is contained in:
epriestley 2014-08-12 19:32:15 -07:00
parent 54bea946c1
commit e9c80de73c
2 changed files with 4 additions and 1 deletions

View file

@ -26,7 +26,7 @@ abstract class ArcanistLinterTestCase extends ArcanistPhutilTestCase {
$linter = clone $linter;
$contents = Filesystem::readFile($file);
$contents = explode("~~~~~~~~~~\n", $contents);
$contents = preg_split('/^~{4,}\n/m', $contents);
if (count($contents) < 2) {
throw new Exception(
"Expected '~~~~~~~~~~' separating test case and results.");

View file

@ -0,0 +1,3 @@
This is just testing that we're flexible about the number of "~" characters on
the line separating the data sections.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~