Changeset View
Changeset View
Standalone View
Standalone View
src/lexer/__tests__/PhutilShellLexerTestCase.php
<?php | <?php | ||||
final class PhutilShellLexerTestCase extends PhutilTestCase { | final class PhutilShellLexerTestCase extends PhutilTestCase { | ||||
public function testShellLexer() { | public function testShellLexer() { | ||||
$dir = dirname(__FILE__).'/shell'; | $dir = __DIR__.'/shell'; | ||||
foreach (Filesystem::listDirectory($dir, $hidden = false) as $file) { | foreach (Filesystem::listDirectory($dir, $hidden = false) as $file) { | ||||
$data = Filesystem::readFile($dir.'/'.$file); | $data = Filesystem::readFile($dir.'/'.$file); | ||||
$data = rtrim($data, "\n"); | $data = rtrim($data, "\n"); | ||||
$this->runLexer($file, $data); | $this->runLexer($file, $data); | ||||
} | } | ||||
} | } | ||||
private function runLexer($file, $data) { | private function runLexer($file, $data) { | ||||
▲ Show 20 Lines • Show All 194 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