Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15336172
D10251.id24670.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
991 B
Referenced Files
None
Subscribers
None
D10251.id24670.diff
View Options
diff --git a/src/lint/linter/__tests__/ArcanistLinterTestCase.php b/src/lint/linter/__tests__/ArcanistLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistLinterTestCase.php
@@ -26,7 +26,7 @@
$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.");
diff --git a/src/lint/linter/__tests__/text/variable-dividers.lint-test b/src/lint/linter/__tests__/text/variable-dividers.lint-test
new file mode 100644
--- /dev/null
+++ b/src/lint/linter/__tests__/text/variable-dividers.lint-test
@@ -0,0 +1,3 @@
+This is just testing that we're flexible about the number of "~" characters on
+the line separating the data sections.
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 9, 6:20 PM (2 w, 14 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7382501
Default Alt Text
D10251.id24670.diff (991 B)
Attached To
Mode
D10251: Make arcanist lint tests flexible about testcase formatting
Attached
Detach File
Event Timeline
Log In to Comment