From 238201805dd23ea422a107b3170de7892335137b Mon Sep 17 00:00:00 2001 From: Fred Emmott Date: Fri, 27 Jul 2018 13:50:59 -0700 Subject: Split Hack out from PHP, modernize fixes #1738 - Replace previous `hh_client` usage with LSP client - Add `HHAST` linter - Split Hack from PHP: Hack is increasingly diverging from PHP: - Hack tools do not understand PHP - Most PHP tools do not handle Hack code well (including vim's syntax highightling files) - http://github.com/hhvm/vim-hack now sets filetype to `hack` --- test/fixers/test_hackfmt_fixer_callback.vader | 14 +++++++------- test/hack_files/testfile.php | 4 ++++ 2 files changed, 11 insertions(+), 7 deletions(-) (limited to 'test') diff --git a/test/fixers/test_hackfmt_fixer_callback.vader b/test/fixers/test_hackfmt_fixer_callback.vader index ed78fc85..d294c15e 100644 --- a/test/fixers/test_hackfmt_fixer_callback.vader +++ b/test/fixers/test_hackfmt_fixer_callback.vader @@ -1,10 +1,10 @@ Before: - Save g:ale_php_hackfmt_executable - Save g:ale_php_hackfmt_options + Save g:ale_hack_hackfmt_executable + Save g:ale_hack_hackfmt_options " Use an invalid global executable, so we don't match it. - let g:ale_php_hackfmt_executable = 'xxxinvalid' - let g:ale_php_hackfmt_options = '' + let g:ale_hack_hackfmt_executable = 'xxxinvalid' + let g:ale_hack_hackfmt_options = '' call ale#test#SetDirectory('/testplugin/test/fixers') @@ -14,7 +14,7 @@ After: call ale#test#RestoreDirectory() Execute(The hackfmt callback should return the correct default values): - call ale#test#SetFilename('../hack_files/testfile.php') + call ale#test#SetFilename('../hack_files/testfile.hack') AssertEqual \ { @@ -25,8 +25,8 @@ Execute(The hackfmt callback should return the correct default values): \ ale#fixers#hackfmt#Fix(bufnr('')) Execute(The hackfmt callback should include custom hackfmt options): - let g:ale_php_hackfmt_options = "--some-option" - call ale#test#SetFilename('../hack_files/testfile.php') + let g:ale_hack_hackfmt_options = "--some-option" + call ale#test#SetFilename('../hack_files/testfile.hack') AssertEqual \ { diff --git a/test/hack_files/testfile.php b/test/hack_files/testfile.php index e69de29b..313995d1 100644 --- a/test/hack_files/testfile.php +++ b/test/hack_files/testfile.php @@ -0,0 +1,4 @@ + { +} -- cgit v1.2.3