summaryrefslogtreecommitdiff
path: root/test/fixers
diff options
context:
space:
mode:
Diffstat (limited to 'test/fixers')
-rw-r--r--test/fixers/eslint-test-files/app-with-eslint-d/node_modules/.bin/eslint_d0
-rw-r--r--test/fixers/eslint-test-files/node_modules/.bin/eslint0
-rw-r--r--test/fixers/eslint-test-files/other-app/subdir/testfile.js0
-rw-r--r--test/fixers/eslint-test-files/react-app/.eslintrc.js0
-rw-r--r--test/fixers/eslint-test-files/react-app/node_modules/eslint/bin/eslint.js0
-rw-r--r--test/fixers/eslint-test-files/react-app/node_modules/standard/bin/cmd.js0
-rw-r--r--test/fixers/eslint-test-files/react-app/node_modules/stylelint/bin/stylelint.js0
-rw-r--r--test/fixers/eslint-test-files/react-app/subdir/testfile.css0
-rw-r--r--test/fixers/eslint-test-files/react-app/subdir/testfile.js0
-rw-r--r--test/fixers/long-line-project/setup.cfg2
-rw-r--r--test/fixers/test_astyle_fixer_callback.vader4
-rw-r--r--test/fixers/test_autoimport_fixer_callback.vader8
-rw-r--r--test/fixers/test_autopep8_fixer_callback.vader8
-rw-r--r--test/fixers/test_bibclean_fixer_callback.vader4
-rw-r--r--test/fixers/test_black_fixer_callback.vader14
-rw-r--r--test/fixers/test_break_up_long_lines_python_fixer.vader2
-rw-r--r--test/fixers/test_buildifier_fixer_callback.vader8
-rw-r--r--test/fixers/test_clangformat_fixer_callback.vader8
-rw-r--r--test/fixers/test_clangtidy_fixer_callback.vader4
-rw-r--r--test/fixers/test_dartfmt_fixer_callback.vader4
-rw-r--r--test/fixers/test_dfmt_fixer_callback.vader4
-rw-r--r--test/fixers/test_elm_format_fixer_callback.vader16
-rw-r--r--test/fixers/test_eslint_fixer_callback.vader76
-rw-r--r--test/fixers/test_fecs_fixer_callback.vader2
-rw-r--r--test/fixers/test_fish_indent_fixer_callback.vader4
-rw-r--r--test/fixers/test_fixjson_fixer_callback.vader2
-rw-r--r--test/fixers/test_gnatpp_fixer_callback.vader4
-rw-r--r--test/fixers/test_gofmt_fixer_callback.vader6
-rw-r--r--test/fixers/test_goimports_fixer_callback.vader2
-rw-r--r--test/fixers/test_gomod_fixer_callback.vader4
-rw-r--r--test/fixers/test_importjs_fixer_callback.vader2
-rw-r--r--test/fixers/test_isort_fixer_callback.vader10
-rw-r--r--test/fixers/test_ktlint_fixer_callback.vader4
-rw-r--r--test/fixers/test_latexindent_fixer_callback.vader4
-rw-r--r--test/fixers/test_luafmt_fixer_callback.vader4
-rw-r--r--test/fixers/test_mix_format_fixer_callback.vader4
-rw-r--r--test/fixers/test_ocamlformat_fixer_callback.vader4
-rw-r--r--test/fixers/test_ocp_indent_fixer_callback.vader4
-rw-r--r--test/fixers/test_php_cs_fixer.vader12
-rw-r--r--test/fixers/test_phpcbf_fixer_callback.vader36
-rw-r--r--test/fixers/test_prettier_eslint_fixer.callback.vader10
-rw-r--r--test/fixers/test_prettier_fixer_callback.vader46
-rw-r--r--test/fixers/test_prettier_standard_callback.vader2
-rw-r--r--test/fixers/test_puppetlint_fixer_callback.vader2
-rw-r--r--test/fixers/test_refmt_fixer_callback.vader4
-rw-r--r--test/fixers/test_reorder_python_imports_fixer_callback.vader8
-rw-r--r--test/fixers/test_rubocop_fixer_callback.vader14
-rw-r--r--test/fixers/test_rufo_fixer_callback.vader4
-rw-r--r--test/fixers/test_rustfmt_fixer_callback.vader30
-rw-r--r--test/fixers/test_scalafmt_fixer_callback.vader8
-rw-r--r--test/fixers/test_sorbet_fixer_callback.vader4
-rw-r--r--test/fixers/test_standard_fixer_callback.vader4
-rw-r--r--test/fixers/test_standardrb_fixer_callback.vader10
-rw-r--r--test/fixers/test_stylelint_fixer_callback.vader8
-rw-r--r--test/fixers/test_swiftformat_fixer_callback.vader4
-rw-r--r--test/fixers/test_textlint_fixer_callback.vader4
-rw-r--r--test/fixers/test_tidy_fixer_callback.vader4
-rw-r--r--test/fixers/test_tslint_fixer_callback.vader4
-rw-r--r--test/fixers/test_uncrustify_fixer_callback.vader4
-rw-r--r--test/fixers/test_xo_fixer_callback.vader12
-rw-r--r--test/fixers/test_xots_fixer_callback.vader12
-rw-r--r--test/fixers/test_yamlfix_fixer_callback.vader8
-rw-r--r--test/fixers/test_yapf_fixer_callback.vader10
63 files changed, 233 insertions, 253 deletions
diff --git a/test/fixers/eslint-test-files/app-with-eslint-d/node_modules/.bin/eslint_d b/test/fixers/eslint-test-files/app-with-eslint-d/node_modules/.bin/eslint_d
deleted file mode 100644
index e69de29b..00000000
--- a/test/fixers/eslint-test-files/app-with-eslint-d/node_modules/.bin/eslint_d
+++ /dev/null
diff --git a/test/fixers/eslint-test-files/node_modules/.bin/eslint b/test/fixers/eslint-test-files/node_modules/.bin/eslint
deleted file mode 100644
index e69de29b..00000000
--- a/test/fixers/eslint-test-files/node_modules/.bin/eslint
+++ /dev/null
diff --git a/test/fixers/eslint-test-files/other-app/subdir/testfile.js b/test/fixers/eslint-test-files/other-app/subdir/testfile.js
deleted file mode 100644
index e69de29b..00000000
--- a/test/fixers/eslint-test-files/other-app/subdir/testfile.js
+++ /dev/null
diff --git a/test/fixers/eslint-test-files/react-app/.eslintrc.js b/test/fixers/eslint-test-files/react-app/.eslintrc.js
deleted file mode 100644
index e69de29b..00000000
--- a/test/fixers/eslint-test-files/react-app/.eslintrc.js
+++ /dev/null
diff --git a/test/fixers/eslint-test-files/react-app/node_modules/eslint/bin/eslint.js b/test/fixers/eslint-test-files/react-app/node_modules/eslint/bin/eslint.js
deleted file mode 100644
index e69de29b..00000000
--- a/test/fixers/eslint-test-files/react-app/node_modules/eslint/bin/eslint.js
+++ /dev/null
diff --git a/test/fixers/eslint-test-files/react-app/node_modules/standard/bin/cmd.js b/test/fixers/eslint-test-files/react-app/node_modules/standard/bin/cmd.js
deleted file mode 100644
index e69de29b..00000000
--- a/test/fixers/eslint-test-files/react-app/node_modules/standard/bin/cmd.js
+++ /dev/null
diff --git a/test/fixers/eslint-test-files/react-app/node_modules/stylelint/bin/stylelint.js b/test/fixers/eslint-test-files/react-app/node_modules/stylelint/bin/stylelint.js
deleted file mode 100644
index e69de29b..00000000
--- a/test/fixers/eslint-test-files/react-app/node_modules/stylelint/bin/stylelint.js
+++ /dev/null
diff --git a/test/fixers/eslint-test-files/react-app/subdir/testfile.css b/test/fixers/eslint-test-files/react-app/subdir/testfile.css
deleted file mode 100644
index e69de29b..00000000
--- a/test/fixers/eslint-test-files/react-app/subdir/testfile.css
+++ /dev/null
diff --git a/test/fixers/eslint-test-files/react-app/subdir/testfile.js b/test/fixers/eslint-test-files/react-app/subdir/testfile.js
deleted file mode 100644
index e69de29b..00000000
--- a/test/fixers/eslint-test-files/react-app/subdir/testfile.js
+++ /dev/null
diff --git a/test/fixers/long-line-project/setup.cfg b/test/fixers/long-line-project/setup.cfg
deleted file mode 100644
index 43d7a3a1..00000000
--- a/test/fixers/long-line-project/setup.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-[flake8]
-max-line-length = 90
diff --git a/test/fixers/test_astyle_fixer_callback.vader b/test/fixers/test_astyle_fixer_callback.vader
index ac756870..9d2e4c80 100644
--- a/test/fixers/test_astyle_fixer_callback.vader
+++ b/test/fixers/test_astyle_fixer_callback.vader
@@ -71,7 +71,7 @@ Execute(The astyle callback should return the correct default values with a spec
\ ale#fixers#astyle#Fix(bufnr(''))
Execute(The astyle callback should find nearest default option file _astylrc):
- call ale#test#SetFilename('../test_c_projects/makefile_project/subdir/file.c')
+ call ale#test#SetFilename('../test-files/c/makefile_project/subdir/file.c')
let targetfile = bufname(bufnr('%'))
AssertEqual
@@ -83,7 +83,7 @@ Execute(The astyle callback should find nearest default option file _astylrc):
\ ale#fixers#astyle#Fix(bufnr(''))
Execute(The astyle callback should find .astylrc in the same directory as src):
- call ale#test#SetFilename('../test_cpp_project/dummy.cpp')
+ call ale#test#SetFilename('../test-files/cpp/dummy.cpp')
set filetype=cpp " The test fails without this
let targetfile = bufname(bufnr('%'))
diff --git a/test/fixers/test_autoimport_fixer_callback.vader b/test/fixers/test_autoimport_fixer_callback.vader
index bea448b5..67dc46e9 100644
--- a/test/fixers/test_autoimport_fixer_callback.vader
+++ b/test/fixers/test_autoimport_fixer_callback.vader
@@ -25,11 +25,11 @@ Execute(The autoimport callback should return the correct default values):
\ 0,
\ ale#fixers#autoimport#Fix(bufnr(''))
- silent execute 'file ' . fnameescape(g:dir . '/python_paths/with_virtualenv/subdir/foo/bar.py')
+ silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py')
AssertEqual
\ {
\ 'cwd': '%s:h',
- \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/python_paths/with_virtualenv/env/' . b:bin_dir . '/autoimport')) . ' -',
+ \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/autoimport')) . ' -',
\ },
\ ale#fixers#autoimport#Fix(bufnr(''))
@@ -40,11 +40,11 @@ Execute(The autoimport callback should respect custom options):
\ 0,
\ ale#fixers#autoimport#Fix(bufnr(''))
- silent execute 'file ' . fnameescape(g:dir . '/python_paths/with_virtualenv/subdir/foo/bar.py')
+ silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py')
AssertEqual
\ {
\ 'cwd': '%s:h',
- \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/python_paths/with_virtualenv/env/' . b:bin_dir . '/autoimport'))
+ \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/autoimport'))
\ . ' --multi-line=3 --trailing-comma -',
\ },
\ ale#fixers#autoimport#Fix(bufnr(''))
diff --git a/test/fixers/test_autopep8_fixer_callback.vader b/test/fixers/test_autopep8_fixer_callback.vader
index 5678aaf3..9ca90c41 100644
--- a/test/fixers/test_autopep8_fixer_callback.vader
+++ b/test/fixers/test_autopep8_fixer_callback.vader
@@ -25,15 +25,15 @@ Execute(The autopep8 callback should return the correct default values):
\ 0,
\ ale#fixers#autopep8#Fix(bufnr(''))
- silent execute 'file ' . fnameescape(g:dir . '/python_paths/with_virtualenv/subdir/foo/bar.py')
+ silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py')
AssertEqual
- \ {'command': ale#Escape(ale#path#Simplify(g:dir . '/python_paths/with_virtualenv/env/' . b:bin_dir . '/autopep8')) . ' -'},
+ \ {'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/autopep8')) . ' -'},
\ ale#fixers#autopep8#Fix(bufnr(''))
Execute(The autopep8 callback should include options):
let g:ale_python_autopep8_options = '--some-option'
- silent execute 'file ' . fnameescape(g:dir . '/python_paths/with_virtualenv/subdir/foo/bar.py')
+ silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py')
AssertEqual
- \ {'command': ale#Escape(ale#path#Simplify(g:dir . '/python_paths/with_virtualenv/env/' . b:bin_dir . '/autopep8')) . ' --some-option -' },
+ \ {'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/autopep8')) . ' --some-option -' },
\ ale#fixers#autopep8#Fix(bufnr(''))
diff --git a/test/fixers/test_bibclean_fixer_callback.vader b/test/fixers/test_bibclean_fixer_callback.vader
index 8d3081e3..dd1313d2 100644
--- a/test/fixers/test_bibclean_fixer_callback.vader
+++ b/test/fixers/test_bibclean_fixer_callback.vader
@@ -12,7 +12,7 @@ After:
call ale#test#RestoreDirectory()
Execute(The bibclean callback should return the correct default values):
- call ale#test#SetFilename('../command_callback/bib_paths/dummy.bib')
+ call ale#test#SetFilename('../command_callback/../test-files/bib/dummy.bib')
AssertEqual
\ {'command': ale#Escape(g:ale_bib_bibclean_executable) . ' -align-equals'},
@@ -20,7 +20,7 @@ Execute(The bibclean callback should return the correct default values):
Execute(The bibclean callback should include custom bibclean options):
let g:ale_bib_bibclean_options = '-author -check-values'
- call ale#test#SetFilename('../command_callback/bib_paths/dummy.bib')
+ call ale#test#SetFilename('../command_callback/../test-files/bib/dummy.bib')
AssertEqual
\ {
diff --git a/test/fixers/test_black_fixer_callback.vader b/test/fixers/test_black_fixer_callback.vader
index 055f8783..6e9f3de7 100644
--- a/test/fixers/test_black_fixer_callback.vader
+++ b/test/fixers/test_black_fixer_callback.vader
@@ -13,36 +13,36 @@ After:
unlet! b:bin_dir
Execute(The black callback should return the correct default values):
- silent execute 'file ' . fnameescape(g:dir . '/python_paths/with_virtualenv/subdir/foo/bar.py')
+ silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py')
AssertEqual
\ {
\ 'cwd': '%s:h',
- \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/python_paths/with_virtualenv/env/' . b:bin_dir . '/black')) . ' -'},
+ \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/black')) . ' -'},
\ ale#fixers#black#Fix(bufnr(''))
Execute(The black callback should include options):
let g:ale_python_black_options = '--some-option'
let g:ale_python_black_change_directory = 0
- silent execute 'file ' . fnameescape(g:dir . '/python_paths/with_virtualenv/subdir/foo/bar.py')
+ silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py')
AssertEqual
- \ {'command': ale#Escape(ale#path#Simplify(g:dir . '/python_paths/with_virtualenv/env/' . b:bin_dir . '/black')) . ' --some-option -' },
+ \ {'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/black')) . ' --some-option -' },
\ ale#fixers#black#Fix(bufnr(''))
Execute(The black callback should include --pyi for .pyi files):
let g:ale_python_black_change_directory = 0
- silent execute 'file ' . fnameescape(g:dir . '/python_paths/with_virtualenv/subdir/foo/bar.pyi')
+ silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.pyi')
AssertEqual
- \ {'command': ale#Escape(ale#path#Simplify(g:dir . '/python_paths/with_virtualenv/env/' . b:bin_dir . '/black')) . ' --pyi -' },
+ \ {'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/black')) . ' --pyi -' },
\ ale#fixers#black#Fix(bufnr(''))
Execute(Pipenv is detected when python_black_auto_pipenv is set):
let g:ale_python_black_auto_pipenv = 1
let g:ale_python_black_change_directory = 0
- call ale#test#SetFilename('../python_fixtures/pipenv/whatever.py')
+ call ale#test#SetFilename('../test-files/python/pipenv/whatever.py')
AssertEqual
\ {'command': ale#Escape('pipenv') . ' run black -'},
diff --git a/test/fixers/test_break_up_long_lines_python_fixer.vader b/test/fixers/test_break_up_long_lines_python_fixer.vader
index 5fd991f0..c7809acd 100644
--- a/test/fixers/test_break_up_long_lines_python_fixer.vader
+++ b/test/fixers/test_break_up_long_lines_python_fixer.vader
@@ -22,7 +22,7 @@ Execute(Long lines with basic function calls should be broken up correctly):
\ ])
Execute(Longer lines should be permitted if a configuration file allows it):
- call ale#test#SetFilename('long-line-project/foo/bar.py')
+ call ale#test#SetFilename('../test-files/long-line/foo/bar.py')
AssertEqual
\ [
diff --git a/test/fixers/test_buildifier_fixer_callback.vader b/test/fixers/test_buildifier_fixer_callback.vader
index 36de9819..db9f1e55 100644
--- a/test/fixers/test_buildifier_fixer_callback.vader
+++ b/test/fixers/test_buildifier_fixer_callback.vader
@@ -6,7 +6,7 @@ After:
call ale#assert#TearDownFixerTest()
Execute(The buildifier callback should return the correct default values):
- call ale#test#SetFilename('bazel_paths/WORKSPACE')
+ call ale#test#SetFilename('../test-files/bazel/WORKSPACE')
AssertFixer
\ {
@@ -15,7 +15,7 @@ Execute(The buildifier callback should return the correct default values):
\ }
Execute(The buildifier callback should include any additional options):
- call ale#test#SetFilename('bazel_paths/WORKSPACE')
+ call ale#test#SetFilename('../test-files/bazel/WORKSPACE')
let g:ale_bazel_buildifier_options = '--some-option'
AssertFixer
@@ -25,7 +25,7 @@ Execute(The buildifier callback should include any additional options):
\ }
Execute(The buildifier callback should recognize BUILD files):
- call ale#test#SetFilename('bazel_paths/BUILD')
+ call ale#test#SetFilename('../test-files/bazel/BUILD')
AssertFixer
\ {
@@ -34,7 +34,7 @@ Execute(The buildifier callback should recognize BUILD files):
\ }
Execute(The buildifier callback should recognize .bzl files):
- call ale#test#SetFilename('bazel_paths/defs.bzl')
+ call ale#test#SetFilename('../test-files/bazel/defs.bzl')
AssertFixer
\ {
diff --git a/test/fixers/test_clangformat_fixer_callback.vader b/test/fixers/test_clangformat_fixer_callback.vader
index b9b74ee8..3e4546d1 100644
--- a/test/fixers/test_clangformat_fixer_callback.vader
+++ b/test/fixers/test_clangformat_fixer_callback.vader
@@ -17,7 +17,7 @@ After:
call ale#test#RestoreDirectory()
Execute(The clang-format callback should return the correct default values):
- call ale#test#SetFilename('c_paths/dummy.c')
+ call ale#test#SetFilename('../test-files/c/dummy.c')
AssertEqual
\ {
@@ -27,7 +27,7 @@ Execute(The clang-format callback should return the correct default values):
\ ale#fixers#clangformat#Fix(bufnr(''))
Execute(The clangformat callback should include any additional options):
- call ale#test#SetFilename('c_paths/dummy.c')
+ call ale#test#SetFilename('../test-files/c/dummy.c')
let g:ale_c_clangformat_options = '--some-option'
AssertEqual
@@ -39,7 +39,7 @@ Execute(The clangformat callback should include any additional options):
\ ale#fixers#clangformat#Fix(bufnr(''))
Execute(The clangformat callback should include style options as well):
- call ale#test#SetFilename('c_paths/dummy.c')
+ call ale#test#SetFilename('../test-files/c/dummy.c')
let g:ale_c_clangformat_options = '--some-option'
let g:ale_c_clangformat_style_option = '{BasedOnStyle: Microsoft, ColumnLimit:80,}'
@@ -52,7 +52,7 @@ Execute(The clangformat callback should include style options as well):
\ ale#fixers#clangformat#Fix(bufnr(''))
Execute(The clangformat callback should use local file instead of style options):
- call ale#test#SetFilename('clangformat_paths/with_clangformat/dummy.c')
+ call ale#test#SetFilename('../test-files/clangformat/with_clangformat/dummy.c')
let g:ale_c_clangformat_options = '--some-option'
let g:ale_c_clangformat_style_option = '{BasedOnStyle: Microsoft, ColumnLimit:80,}'
let g:ale_c_clangformat_use_local_file = 1
diff --git a/test/fixers/test_clangtidy_fixer_callback.vader b/test/fixers/test_clangtidy_fixer_callback.vader
index ca08e6bc..7a04e801 100644
--- a/test/fixers/test_clangtidy_fixer_callback.vader
+++ b/test/fixers/test_clangtidy_fixer_callback.vader
@@ -26,7 +26,7 @@ After:
call ale#test#RestoreDirectory()
Execute(The clangtidy callback should return the correct default values):
- call ale#test#SetFilename('c_paths/dummy.c')
+ call ale#test#SetFilename('../test-files/c/dummy.c')
AssertEqual
\ {
@@ -37,7 +37,7 @@ Execute(The clangtidy callback should return the correct default values):
\ ale#fixers#clangtidy#Fix(bufnr(''))
Execute(The clangtidy callback should include any additional options):
- call ale#test#SetFilename('c_paths/dummy.c')
+ call ale#test#SetFilename('../test-files/c/dummy.c')
let g:ale_c_clangtidy_extra_options = '--some-option'
AssertEqual
diff --git a/test/fixers/test_dartfmt_fixer_callback.vader b/test/fixers/test_dartfmt_fixer_callback.vader
index 79c40eff..c783c9a4 100644
--- a/test/fixers/test_dartfmt_fixer_callback.vader
+++ b/test/fixers/test_dartfmt_fixer_callback.vader
@@ -14,7 +14,7 @@ After:
call ale#test#RestoreDirectory()
Execute(The dartfmt callback should return the correct default values):
- call ale#test#SetFilename('../dart_files/testfile.dart')
+ call ale#test#SetFilename('../test-files/dart/testfile.dart')
AssertEqual
\ {
@@ -27,7 +27,7 @@ Execute(The dartfmt callback should return the correct default values):
Execute(The dartfmt callback should include custom dartfmt options):
let g:ale_dart_dartfmt_options = "-l 80"
- call ale#test#SetFilename('../dart_files/testfile.dart')
+ call ale#test#SetFilename('../test-files/dart/testfile.dart')
AssertEqual
\ {
diff --git a/test/fixers/test_dfmt_fixer_callback.vader b/test/fixers/test_dfmt_fixer_callback.vader
index 5ecb56e6..5749224e 100644
--- a/test/fixers/test_dfmt_fixer_callback.vader
+++ b/test/fixers/test_dfmt_fixer_callback.vader
@@ -14,7 +14,7 @@ After:
call ale#test#RestoreDirectory()
Execute(The dfmt callback should return the correct default values):
- call ale#test#SetFilename('../d_files/test.d')
+ call ale#test#SetFilename('../test-files/d/test.d')
AssertEqual
\ {
@@ -27,7 +27,7 @@ Execute(The dfmt callback should return the correct default values):
Execute(The dfmt callback should include custom dfmt options):
let g:ale_d_dfmt_options = "--space-after-cast"
- call ale#test#SetFilename('../d_files/test.d')
+ call ale#test#SetFilename('../test-files/d/test.d')
AssertEqual
\ {
diff --git a/test/fixers/test_elm_format_fixer_callback.vader b/test/fixers/test_elm_format_fixer_callback.vader
index 682c22ca..35244737 100644
--- a/test/fixers/test_elm_format_fixer_callback.vader
+++ b/test/fixers/test_elm_format_fixer_callback.vader
@@ -9,19 +9,19 @@ After:
call ale#test#RestoreDirectory()
Execute(The elm-format command should have default params):
- call ale#test#SetFilename('../elm-test-files/src/subdir/testfile.elm')
+ call ale#test#SetFilename('../test-files/elm/src/subdir/testfile.elm')
AssertEqual
\ {
\ 'read_temporary_file': 1,
\ 'command':
- \ ale#Escape(ale#path#Simplify(g:dir . '/../elm-test-files/node_modules/.bin/elm-format'))
+ \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/elm/node_modules/.bin/elm-format'))
\ . ' %t --yes',
\ },
\ ale#fixers#elm_format#Fix(bufnr(''))
Execute(The elm-format command should manage use_global = 1 param):
- call ale#test#SetFilename('../elm-test-files/src/subdir/testfile.elm')
+ call ale#test#SetFilename('../test-files/elm/src/subdir/testfile.elm')
let b:ale_elm_format_use_global = 1
AssertEqual
@@ -34,7 +34,7 @@ Execute(The elm-format command should manage use_global = 1 param):
\ ale#fixers#elm_format#Fix(bufnr(''))
Execute(The elm-format command should manage executable param):
- call ale#test#SetFilename('../elm-test-files/src/subdir/testfile.elm')
+ call ale#test#SetFilename('../test-files/elm/src/subdir/testfile.elm')
let b:ale_elm_format_use_global = 1
let b:ale_elm_format_executable = 'elmformat'
@@ -48,27 +48,27 @@ Execute(The elm-format command should manage executable param):
\ ale#fixers#elm_format#Fix(bufnr(''))
Execute(The elm-format command should manage empty options):
- call ale#test#SetFilename('../elm-test-files/src/subdir/testfile.elm')
+ call ale#test#SetFilename('../test-files/elm/src/subdir/testfile.elm')
let b:ale_elm_format_options = ''
AssertEqual
\ {
\ 'read_temporary_file': 1,
\ 'command':
- \ ale#Escape(ale#path#Simplify(g:dir . '/../elm-test-files/node_modules/.bin/elm-format'))
+ \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/elm/node_modules/.bin/elm-format'))
\ . ' %t',
\ },
\ ale#fixers#elm_format#Fix(bufnr(''))
Execute(The elm-format command should manage custom options):
- call ale#test#SetFilename('../elm-test-files/src/subdir/testfile.elm')
+ call ale#test#SetFilename('../test-files/elm/src/subdir/testfile.elm')
let b:ale_elm_format_options = '--param1 --param2'
AssertEqual
\ {
\ 'read_temporary_file': 1,
\ 'command':
- \ ale#Escape(ale#path#Simplify(g:dir . '/../elm-test-files/node_modules/.bin/elm-format'))
+ \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/elm/node_modules/.bin/elm-format'))
\ . ' %t --param1 --param2',
\ },
\ ale#fixers#elm_format#Fix(bufnr(''))
diff --git a/test/fixers/test_eslint_fixer_callback.vader b/test/fixers/test_eslint_fixer_callback.vader
index 48cafe78..4a1dc47c 100644
--- a/test/fixers/test_eslint_fixer_callback.vader
+++ b/test/fixers/test_eslint_fixer_callback.vader
@@ -10,17 +10,17 @@ After:
call ale#assert#TearDownFixerTest()
Execute(The executable path should be correct):
- call ale#test#SetFilename('../eslint-test-files/react-app/subdir/testfile.js')
+ call ale#test#SetFilename('../test-files/eslint/react-app/subdir/testfile.js')
" eslint_d output with an older eslint version is used here.
GivenCommandOutput ['v4.4.1 (eslint_d v5.1.0)']
AssertFixer
\ {
\ 'read_temporary_file': 1,
- \ 'cwd': ale#path#Simplify(g:dir . '/../eslint-test-files/react-app'),
+ \ 'cwd': ale#path#Simplify(g:dir . '/../test-files/eslint/react-app'),
\ 'command': (has('win32') ? 'node.exe ' : '')
- \ . ale#Escape(ale#path#Simplify(g:dir . '/../eslint-test-files/react-app/node_modules/eslint/bin/eslint.js'))
- \ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/../eslint-test-files/react-app/.eslintrc.js'))
+ \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/eslint/bin/eslint.js'))
+ \ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/.eslintrc.js'))
\ . ' --fix %t',
\ }
@@ -162,29 +162,29 @@ Execute(The ESLint fixer should use a config file option if set for new versions
\ }
Execute(The lower priority configuration file in a nested directory should be preferred):
- call ale#test#SetFilename('../eslint-test-files/react-app/subdir-with-config/testfile.js')
+ call ale#test#SetFilename('../test-files/eslint/react-app/subdir-with-config/testfile.js')
AssertFixer
\ {
\ 'read_temporary_file': 1,
- \ 'cwd': ale#path#Simplify(g:dir . '/../eslint-test-files/react-app'),
+ \ 'cwd': ale#path#Simplify(g:dir . '/../test-files/eslint/react-app'),
\ 'command': (has('win32') ? 'node.exe ' : '')
- \ . ale#Escape(ale#path#Simplify(g:dir . '/../eslint-test-files/react-app/node_modules/eslint/bin/eslint.js'))
- \ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/../eslint-test-files/react-app/subdir-with-config/.eslintrc'))
+ \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/eslint/bin/eslint.js'))
+ \ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/subdir-with-config/.eslintrc'))
\ . ' --fix %t',
\ }
Execute(--config in options should override configuration file detection for old versions):
- call ale#test#SetFilename('../eslint-test-files/react-app/subdir-with-config/testfile.js')
+ call ale#test#SetFilename('../test-files/eslint/react-app/subdir-with-config/testfile.js')
let b:ale_javascript_eslint_options = '--config /foo.cfg'
AssertFixer
\ {
\ 'read_temporary_file': 1,
- \ 'cwd': ale#path#Simplify(g:dir . '/../eslint-test-files/react-app'),
+ \ 'cwd': ale#path#Simplify(g:dir . '/../test-files/eslint/react-app'),
\ 'command': (has('win32') ? 'node.exe ' : '')
- \ . ale#Escape(ale#path#Simplify(g:dir . '/../eslint-test-files/react-app/node_modules/eslint/bin/eslint.js'))
+ \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/eslint/bin/eslint.js'))
\ . ' --config /foo.cfg'
\ . ' --fix %t',
\ }
@@ -194,50 +194,50 @@ Execute(--config in options should override configuration file detection for old
AssertFixer
\ {
\ 'read_temporary_file': 1,
- \ 'cwd': ale#path#Simplify(g:dir . '/../eslint-test-files/react-app'),
+ \ 'cwd': ale#path#Simplify(g:dir . '/../test-files/eslint/react-app'),
\ 'command': (has('win32') ? 'node.exe ' : '')
- \ . ale#Escape(ale#path#Simplify(g:dir . '/../eslint-test-files/react-app/node_modules/eslint/bin/eslint.js'))
+ \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/eslint/bin/eslint.js'))
\ . ' -c /foo.cfg'
\ . ' --fix %t',
\ }
Execute(package.json should be used as a last resort):
- call ale#test#SetFilename('../eslint-test-files/react-app/subdir-with-package-json/testfile.js')
+ call ale#test#SetFilename('../test-files/eslint/react-app/subdir-with-package-json/testfile.js')
AssertFixer
\ {
\ 'read_temporary_file': 1,
- \ 'cwd': ale#path#Simplify(g:dir . '/../eslint-test-files/react-app'),
+ \ 'cwd': ale#path#Simplify(g:dir . '/../test-files/eslint/react-app'),
\ 'command': (has('win32') ? 'node.exe ' : '')
- \ . ale#Escape(ale#path#Simplify(g:dir . '/../eslint-test-files/react-app/node_modules/eslint/bin/eslint.js'))
- \ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/../eslint-test-files/react-app/.eslintrc.js'))
+ \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/eslint/bin/eslint.js'))
+ \ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/.eslintrc.js'))
\ . ' --fix %t',
\ }
- call ale#test#SetFilename('../eslint-test-files/package.json')
+ call ale#test#SetFilename('../test-files/eslint/package.json')
AssertFixer
\ {
\ 'read_temporary_file': 1,
- \ 'cwd': ale#path#Simplify(g:dir . '/../eslint-test-files'),
- \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../eslint-test-files/node_modules/.bin/eslint'))
- \ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/../eslint-test-files/package.json'))
+ \ 'cwd': ale#path#Simplify(g:dir . '/../test-files/eslint'),
+ \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/node_modules/.bin/eslint'))
+ \ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/package.json'))
\ . ' --fix %t',
\ }
Execute(The version check should be correct):
- call ale#test#SetFilename('../eslint-test-files/react-app/subdir-with-config/testfile.js')
+ call ale#test#SetFilename('../test-files/eslint/react-app/subdir-with-config/testfile.js')
" We should run the command to get the version the first time.
GivenCommandOutput ['4.9.0']
AssertFixer [
\ (has('win32') ? 'node.exe ' : '')
- \ . ale#Escape(ale#path#Simplify(g:dir . '/../eslint-test-files/react-app/node_modules/eslint/bin/eslint.js'))
+ \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/eslint/bin/eslint.js'))
\ . ' --version',
\ {
- \ 'cwd': ale#path#Simplify(g:dir . '/../eslint-test-files/react-app'),
+ \ 'cwd': ale#path#Simplify(g:dir . '/../test-files/eslint/react-app'),
\ 'command': (has('win32') ? 'node.exe ' : '')
- \ . ale#Escape(ale#path#Simplify(g:dir . '/../eslint-test-files/react-app/node_modules/eslint/bin/eslint.js'))
+ \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/eslint/bin/eslint.js'))
\ . ' --stdin-filename %s --stdin --fix-dry-run --format=json',
\ 'process_with': 'ale#fixers#eslint#ProcessFixDryRunOutput',
\ },
@@ -245,36 +245,36 @@ Execute(The version check should be correct):
AssertFixer [
\ {
- \ 'cwd': ale#path#Simplify(g:dir . '/../eslint-test-files/react-app'),
+ \ 'cwd': ale#path#Simplify(g:dir . '/../test-files/eslint/react-app'),
\ 'command': (has('win32') ? 'node.exe ' : '')
- \ . ale#Escape(ale#path#Simplify(g:dir . '/../eslint-test-files/react-app/node_modules/eslint/bin/eslint.js'))
+ \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/eslint/bin/eslint.js'))
\ . ' --stdin-filename %s --stdin --fix-dry-run --format=json',
\ 'process_with': 'ale#fixers#eslint#ProcessFixDryRunOutput',
\ },
\]
Execute(--fix-dry-run should be used for 4.9.0 and up):
- call ale#test#SetFilename('../eslint-test-files/react-app/subdir/testfile.js')
+ call ale#test#SetFilename('../test-files/eslint/react-app/subdir/testfile.js')
GivenCommandOutput ['4.9.0']
AssertFixer
\ {
- \ 'cwd': ale#path#Simplify(g:dir . '/../eslint-test-files/react-app'),
+ \ 'cwd': ale#path#Simplify(g:dir . '/../test-files/eslint/react-app'),
\ 'command': (has('win32') ? 'node.exe ' : '')
- \ . ale#Escape(ale#path#Simplify(g:dir . '/../eslint-test-files/react-app/node_modules/eslint/bin/eslint.js'))
+ \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/eslint/bin/eslint.js'))
\ . ' --stdin-filename %s --stdin --fix-dry-run --format=json',
\ 'process_with': 'ale#fixers#eslint#ProcessFixDryRunOutput',
\ }
Execute(--fix-to-stdout should be used for eslint_d):
- call ale#test#SetFilename('../eslint-test-files/app-with-eslint-d/testfile.js')
+ call ale#test#SetFilename('../test-files/eslint/app-with-eslint-d/testfile.js')
AssertFixer
\ {
\ 'read_temporary_file': 1,
- \ 'cwd': ale#path#Simplify(g:dir . '/../eslint-test-files/app-with-eslint-d'),
- \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../eslint-test-files/app-with-eslint-d/node_modules/.bin/eslint_d'))
- \ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/../eslint-test-files/package.json'))
+ \ 'cwd': ale#path#Simplify(g:dir . '/../test-files/eslint/app-with-eslint-d'),
+ \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/app-with-eslint-d/node_modules/.bin/eslint_d'))
+ \ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/package.json'))
\ . ' --fix %t',
\ }
@@ -283,8 +283,8 @@ Execute(--fix-to-stdout should be used for eslint_d):
GivenCommandOutput ['v3.19.0 (eslint_d v4.2.0)']
AssertFixer
\ {
- \ 'cwd': ale#path#Simplify(g:dir . '/../eslint-test-files/app-with-eslint-d'),
- \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../eslint-test-files/app-with-eslint-d/node_modules/.bin/eslint_d'))
+ \ 'cwd': ale#path#Simplify(g:dir . '/../test-files/eslint/app-with-eslint-d'),
+ \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/app-with-eslint-d/node_modules/.bin/eslint_d'))
\ . ' --stdin-filename %s --stdin --fix-to-stdout',
\ 'process_with': 'ale#fixers#eslint#ProcessEslintDOutput',
\ }
@@ -293,8 +293,8 @@ Execute(--fix-to-stdout should be used for eslint_d):
GivenCommandOutput ['4.9.0']
AssertFixer
\ {
- \ 'cwd': ale#path#Simplify(g:dir . '/../eslint-test-files/app-with-eslint-d'),
- \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../eslint-test-files/app-with-eslint-d/node_modules/.bin/eslint_d'))
+ \ 'cwd': ale#path#Simplify(g:dir . '/../test-files/eslint/app-with-eslint-d'),
+ \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/app-with-eslint-d/node_modules/.bin/eslint_d'))
\ . ' --stdin-filename %s --stdin --fix-to-stdout',
\ 'process_with': 'ale#fixers#eslint#ProcessEslintDOutput',
\ }
diff --git a/test/fixers/test_fecs_fixer_callback.vader b/test/fixers/test_fecs_fixer_callback.vader
index 809b4d46..b218e550 100644
--- a/test/fixers/test_fecs_fixer_callback.vader
+++ b/test/fixers/test_fecs_fixer_callback.vader
@@ -6,7 +6,7 @@ After:
call ale#assert#TearDownFixerTest()
Execute(The fecs fixer should respect to g:ale_javascript_fecs_executable):
- let g:ale_javascript_fecs_executable = 'fecs_paths/fecs'
+ let g:ale_javascript_fecs_executable = '../test-files/fecs/fecs'
let g:ale_javascript_fecs_use_global = 1
silent cd ../command_callback
let g:dir = getcwd()
diff --git a/test/fixers/test_fish_indent_fixer_callback.vader b/test/fixers/test_fish_indent_fixer_callback.vader
index beb0b42e..3555a974 100644
--- a/test/fixers/test_fish_indent_fixer_callback.vader
+++ b/test/fixers/test_fish_indent_fixer_callback.vader
@@ -14,7 +14,7 @@ After:
call ale#test#RestoreDirectory()
Execute(The fish_indent callback should return the correct default values):
- call ale#test#SetFilename('../fish_files/testfile.fish')
+ call ale#test#SetFilename('../test-files/fish/testfile.fish')
AssertEqual
\ {
@@ -27,7 +27,7 @@ Execute(The fish_indent callback should return the correct default values):
Execute(The fish_indent callback should include custom fish_indent options):
let g:ale_fish_fish_indent_options = "-d"
- call ale#test#SetFilename('../fish_files/testfile.fish')
+ call ale#test#SetFilename('../test-files/fish/testfile.fish')
AssertEqual
\ {
diff --git a/test/fixers/test_fixjson_fixer_callback.vader b/test/fixers/test_fixjson_fixer_callback.vader
index 1a3bdcfc..2b023fad 100644
--- a/test/fixers/test_fixjson_fixer_callback.vader
+++ b/test/fixers/test_fixjson_fixer_callback.vader
@@ -20,7 +20,7 @@ Execute(The fixjson callback should return the correct default command):
\ ale#fixers#fixjson#Fix(bufnr(''))
Execute(The fixjson callback should set the buffer name as file name):
- call ale#test#SetFilename('../json_files/testfile.json')
+ call ale#test#SetFilename('../test-files/json/testfile.json')
AssertEqual
\ {
diff --git a/test/fixers/test_gnatpp_fixer_callback.vader b/test/fixers/test_gnatpp_fixer_callback.vader
index a2bf898e..7a3ed517 100644
--- a/test/fixers/test_gnatpp_fixer_callback.vader
+++ b/test/fixers/test_gnatpp_fixer_callback.vader
@@ -8,7 +8,7 @@ After:
call ale#assert#TearDownFixerTest()
Execute(The default command should be correct):
- call ale#test#SetFilename('../ada_files/testfile.adb')
+ call ale#test#SetFilename('../test-files/ada/testfile.adb')
AssertFixer
\ {
@@ -17,7 +17,7 @@ Execute(The default command should be correct):
\ }
Execute(The version check should be correct):
- call ale#test#SetFilename('../ada_files/testfile.adb')
+ call ale#test#SetFilename('../test-files/ada/testfile.adb')
let g:ale_ada_gnatpp_options = '--no-alignment'
AssertFixer
diff --git a/test/fixers/test_gofmt_fixer_callback.vader b/test/fixers/test_gofmt_fixer_callback.vader
index 99407173..579dd3db 100644
--- a/test/fixers/test_gofmt_fixer_callback.vader
+++ b/test/fixers/test_gofmt_fixer_callback.vader
@@ -17,7 +17,7 @@ After:
call ale#test#RestoreDirectory()
Execute(The gofmt callback should return the correct default values):
- call ale#test#SetFilename('../go_files/testfile.go')
+ call ale#test#SetFilename('../test-files/go/testfile.go')
AssertEqual
\ {
@@ -28,7 +28,7 @@ Execute(The gofmt callback should return the correct default values):
Execute(The gofmt callback should include custom gofmt options):
let g:ale_go_gofmt_options = "-r '(a) -> a'"
- call ale#test#SetFilename('../go_files/testfile.go')
+ call ale#test#SetFilename('../test-files/go/testfile.go')
AssertEqual
\ {
@@ -40,7 +40,7 @@ Execute(The gofmt callback should include custom gofmt options):
Execute(The gofmt callback should support Go environment variables):
let g:ale_go_go111module = 'off'
- call ale#test#SetFilename('../go_files/testfile.go')
+ call ale#test#SetFilename('../test-files/go/testfile.go')
AssertEqual
\ {
diff --git a/test/fixers/test_goimports_fixer_callback.vader b/test/fixers/test_goimports_fixer_callback.vader
index 3ea022ff..64c75b2d 100644
--- a/test/fixers/test_goimports_fixer_callback.vader
+++ b/test/fixers/test_goimports_fixer_callback.vader
@@ -8,7 +8,7 @@ Before:
let g:ale_go_goimports_options = ''
call ale#test#SetDirectory('/testplugin/test/fixers')
- call ale#test#SetFilename('../go_files/testfile.go')
+ call ale#test#SetFilename('../test-files/go/testfile.go')
After:
Restore
diff --git a/test/fixers/test_gomod_fixer_callback.vader b/test/fixers/test_gomod_fixer_callback.vader
index 422caf63..56fb9854 100644
--- a/test/fixers/test_gomod_fixer_callback.vader
+++ b/test/fixers/test_gomod_fixer_callback.vader
@@ -15,7 +15,7 @@ After:
call ale#test#RestoreDirectory()
Execute(The gomod callback should return the correct default values):
- call ale#test#SetFilename('../go_files/go.mod')
+ call ale#test#SetFilename('../test-files/go/go.mod')
setl filetype=gomod
AssertEqual
@@ -28,7 +28,7 @@ Execute(The gomod callback should return the correct default values):
\ ale#fixers#gomod#Fix(bufnr(''))
Execute(The gomod callback should support Go environment variables):
- call ale#test#SetFilename('../go_files/go.mod')
+ call ale#test#SetFilename('../test-files/go/go.mod')
setl filetype=gomod
let g:ale_go_go111module = 'on'
diff --git a/test/fixers/test_importjs_fixer_callback.vader b/test/fixers/test_importjs_fixer_callback.vader
index 53b87c2e..727e6a16 100644
--- a/test/fixers/test_importjs_fixer_callback.vader
+++ b/test/fixers/test_importjs_fixer_callback.vader
@@ -5,7 +5,7 @@ Before:
let g:ale_javascript_importjs_executable = 'xxxinvalid'
call ale#test#SetDirectory('/testplugin/test/fixers')
- call ale#test#SetFilename('../javascript_files/test.js')
+ call ale#test#SetFilename('../test-files/javascript/test.js')
After:
Restore
diff --git a/test/fixers/test_isort_fixer_callback.vader b/test/fixers/test_isort_fixer_callback.vader
index 96632c8c..5f3cc447 100644
--- a/test/fixers/test_isort_fixer_callback.vader
+++ b/test/fixers/test_isort_fixer_callback.vader
@@ -17,11 +17,11 @@ Execute(The isort callback should return the correct default values):
\ 0,
\ ale#fixers#isort#Fix(bufnr(''))
- silent execute 'file ' . fnameescape(g:dir . '/python_paths/with_virtualenv/subdir/foo/bar.py')
+ silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py')
AssertEqual
\ {
\ 'cwd': '%s:h',
- \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/python_paths/with_virtualenv/env/' . b:bin_dir . '/isort')) . ' -',
+ \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/isort')) . ' -',
\ },
\ ale#fixers#isort#Fix(bufnr(''))
@@ -32,11 +32,11 @@ Execute(The isort callback should respect custom options):
\ 0,
\ ale#fixers#isort#Fix(bufnr(''))
- silent execute 'file ' . fnameescape(g:dir . '/python_paths/with_virtualenv/subdir/foo/bar.py')
+ silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py')
AssertEqual
\ {
\ 'cwd': '%s:h',
- \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/python_paths/with_virtualenv/env/' . b:bin_dir . '/isort'))
+ \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/isort'))
\ . ' --multi-line=3 --trailing-comma -',
\ },
\ ale#fixers#isort#Fix(bufnr(''))
@@ -44,7 +44,7 @@ Execute(The isort callback should respect custom options):
Execute(Pipenv is detected when python_isort_auto_pipenv is set):
let g:ale_python_isort_auto_pipenv = 1
- call ale#test#SetFilename('../python_fixtures/pipenv/whatever.py')
+ call ale#test#SetFilename('../test-files/python/pipenv/whatever.py')
AssertEqual
\ {
diff --git a/test/fixers/test_ktlint_fixer_callback.vader b/test/fixers/test_ktlint_fixer_callback.vader
index ba01a409..cfe39205 100644
--- a/test/fixers/test_ktlint_fixer_callback.vader
+++ b/test/fixers/test_ktlint_fixer_callback.vader
@@ -16,7 +16,7 @@ After:
call ale#test#RestoreDirectory()
Execute(The ktlint callback should return the correct default values):
- call ale#test#SetFilename('../kotlin_files/testfile.kt')
+ call ale#test#SetFilename('../test-files/kotlin/testfile.kt')
AssertEqual
\ {
@@ -29,7 +29,7 @@ Execute(The ktlint callback should return the correct default values):
Execute(The ktlint callback should include custom ktlint options):
let g:ale_kotlin_ktlint_options = "--android"
let g:ale_kotlin_ktlint_rulesets = ['/path/to/custom/ruleset.jar']
- call ale#test#SetFilename('../kotlin_files/testfile.kt')
+ call ale#test#SetFilename('../test-files/kotlin/testfile.kt')
AssertEqual
\ {
diff --git a/test/fixers/test_latexindent_fixer_callback.vader b/test/fixers/test_latexindent_fixer_callback.vader
index a440ed65..bd4ac69a 100644
--- a/test/fixers/test_latexindent_fixer_callback.vader
+++ b/test/fixers/test_latexindent_fixer_callback.vader
@@ -14,7 +14,7 @@ After:
call ale#test#RestoreDirectory()
Execute(The latexindent callback should return the correct default values):
- call ale#test#SetFilename('../tex_files/testfile.tex')
+ call ale#test#SetFilename('../test-files/tex/testfile.tex')
AssertEqual
\ {
@@ -25,7 +25,7 @@ Execute(The latexindent callback should return the correct default values):
Execute(The latexindent callback should include custom gofmt options):
let g:ale_tex_latexindent_options = "-l '~/.indentconfig.yaml'"
- call ale#test#SetFilename('../tex_files/testfile.tex')
+ call ale#test#SetFilename('../test-files/tex/testfile.tex')
AssertEqual
\ {
diff --git a/test/fixers/test_luafmt_fixer_callback.vader b/test/fixers/test_luafmt_fixer_callback.vader
index 362da118..ef69f297 100644
--- a/test/fixers/test_luafmt_fixer_callback.vader
+++ b/test/fixers/test_luafmt_fixer_callback.vader
@@ -14,7 +14,7 @@ After:
call ale#test#RestoreDirectory()
Execute(The luafmt callback should return the correct default values):
- call ale#test#SetFilename('../lua_files/testfile.lua')
+ call ale#test#SetFilename('../test-files/lua/testfile.lua')
AssertEqual
\ {
@@ -24,7 +24,7 @@ Execute(The luafmt callback should return the correct default values):
Execute(The luafmt callback should include custom luafmt options):
let g:ale_lua_luafmt_options = "--skip-children"
- call ale#test#SetFilename('../lua_files/testfile.lua')
+ call ale#test#SetFilename('../test-files/lua/testfile.lua')
AssertEqual
\ {
diff --git a/test/fixers/test_mix_format_fixer_callback.vader b/test/fixers/test_mix_format_fixer_callback.vader
index 365fbecf..cd492e81 100644
--- a/test/fixers/test_mix_format_fixer_callback.vader
+++ b/test/fixers/test_mix_format_fixer_callback.vader
@@ -13,7 +13,7 @@ After:
call ale#test#RestoreDirectory()
Execute(The mix_format callback should return the correct default values):
- call ale#test#SetFilename('../elixir-test-files/testfile.ex')
+ call ale#test#SetFilename('../test-files/elixir/testfile.ex')
AssertEqual
\ {
@@ -25,7 +25,7 @@ Execute(The mix_format callback should return the correct default values):
Execute(The mix_format callback should include the correct format options):
let g:ale_elixir_mix_format_options = 'invalid_options'
- call ale#test#SetFilename('../elixir-test-files/testfile.ex')
+ call ale#test#SetFilename('../test-files/elixir/testfile.ex')
AssertEqual
\ {
diff --git a/test/fixers/test_ocamlformat_fixer_callback.vader b/test/fixers/test_ocamlformat_fixer_callback.vader
index 0ccdb070..587fcf56 100644
--- a/test/fixers/test_ocamlformat_fixer_callback.vader
+++ b/test/fixers/test_ocamlformat_fixer_callback.vader
@@ -14,7 +14,7 @@ After:
call ale#test#RestoreDirectory()
Execute(The ocamlformat callback should return the correct default values):
- call ale#test#SetFilename('../ocaml-test-files/testfile.re')
+ call ale#test#SetFilename('../test-files/ocaml/testfile.re')
AssertEqual
\ {
@@ -25,7 +25,7 @@ Execute(The ocamlformat callback should return the correct default values):
Execute(The ocamlformat callback should include custom ocamlformat options):
let g:ale_ocaml_ocamlformat_options = "-m 78"
- call ale#test#SetFilename('../ocaml-test-files/testfile.re')
+ call ale#test#SetFilename('../test-files/ocaml/testfile.re')
AssertEqual
\ {
diff --git a/test/fixers/test_ocp_indent_fixer_callback.vader b/test/fixers/test_ocp_indent_fixer_callback.vader
index 1f61f383..fc336b2d 100644
--- a/test/fixers/test_ocp_indent_fixer_callback.vader
+++ b/test/fixers/test_ocp_indent_fixer_callback.vader
@@ -14,7 +14,7 @@ After:
call ale#test#RestoreDirectory()
Execute(The ocp_indent callback should return the correct default values):
- call ale#test#SetFilename('../ocaml-test-files/ocp_inden_testfile.re')
+ call ale#test#SetFilename('../test-files/ocaml/ocp_inden_testfile.re')
AssertEqual
\ {
@@ -24,7 +24,7 @@ Execute(The ocp_indent callback should return the correct default values):
Execute(The ocp_indent callback should include custom ocp_indent options):
let g:ale_ocaml_ocp_indent_config = "base=4, type=4"
- call ale#test#SetFilename('../ocaml-test-files/ocp_inden_testfile.re')
+ call ale#test#SetFilename('../test-files/ocaml/ocp_inden_testfile.re')
AssertEqual
\ {
diff --git a/test/fixers/test_php_cs_fixer.vader b/test/fixers/test_php_cs_fixer.vader
index b47c190c..550f453c 100644
--- a/test/fixers/test_php_cs_fixer.vader
+++ b/test/fixers/test_php_cs_fixer.vader
@@ -16,22 +16,22 @@ After:
Execute(project with php-cs-fixer should use local by default):
- call ale#test#SetFilename('php_paths/project-with-php-cs-fixer/test.php')
+ call ale#test#SetFilename('../test-files/php/project-with-php-cs-fixer/test.php')
AssertEqual
- \ ale#path#Simplify(g:dir . '/php_paths/project-with-php-cs-fixer/vendor/bin/php-cs-fixer'),
+ \ ale#path#Simplify(g:dir . '/../test-files/php/project-with-php-cs-fixer/vendor/bin/php-cs-fixer'),
\ ale#fixers#php_cs_fixer#GetExecutable(bufnr(''))
Execute(use-global should override local detection):
let g:ale_php_cs_fixer_use_global = 1
- call ale#test#SetFilename('php_paths/project-with-php-cs-fixer/test.php')
+ call ale#test#SetFilename('../test-files/php/project-with-php-cs-fixer/test.php')
AssertEqual
\ 'php-cs-fixer',
\ ale#fixers#php_cs_fixer#GetExecutable(bufnr(''))
Execute(project without php-cs-fixer should use global):
- call ale#test#SetFilename('php_paths/project-without-php-cs-fixer/test.php')
+ call ale#test#SetFilename('../test-files/php/project-without-php-cs-fixer/test.php')
AssertEqual
\ 'php-cs-fixer',
@@ -41,7 +41,7 @@ Execute(project without php-cs-fixer should use global):
Execute(The php-cs-fixer callback should return the correct default values):
- call ale#test#SetFilename('php_paths/project-without-php-cs-fixer/foo/test.php')
+ call ale#test#SetFilename('../test-files/php/project-without-php-cs-fixer/foo/test.php')
AssertEqual
\ {
@@ -54,7 +54,7 @@ Execute(The php-cs-fixer callback should return the correct default values):
Execute(The php-cs-fixer callback should include custom php-cs-fixer options):
let g:ale_php_cs_fixer_options = '--config="$HOME/.php_cs"'
- call ale#test#SetFilename('php_paths/project-without-php-cs-fixer/test.php')
+ call ale#test#SetFilename('../test-files/php/project-without-php-cs-fixer/test.php')
AssertEqual
\ {
diff --git a/test/fixers/test_phpcbf_fixer_callback.vader b/test/fixers/test_phpcbf_fixer_callback.vader
index f7bcc2d8..2d44a44d 100644
--- a/test/fixers/test_phpcbf_fixer_callback.vader
+++ b/test/fixers/test_phpcbf_fixer_callback.vader
@@ -19,48 +19,48 @@ After:
call ale#test#RestoreDirectory()
Execute(project with phpcbf should use local by default):
- call ale#test#SetFilename('php_paths/project-with-phpcbf/foo/test.php')
+ call ale#test#SetFilename('../test-files/php/project-with-phpcbf/foo/test.php')
AssertEqual
- \ ale#path#Simplify(g:dir . '/php_paths/project-with-phpcbf/vendor/bin/phpcbf'),
+ \ ale#path#Simplify(g:dir . '/../test-files/php/project-with-phpcbf/vendor/bin/phpcbf'),
\ ale#fixers#phpcbf#GetExecutable(bufnr(''))
Execute(use-global should override local detection):
let g:ale_php_phpcbf_use_global = 1
- call ale#test#SetFilename('php_paths/project-with-phpcbf/foo/test.php')
+ call ale#test#SetFilename('../test-files/php/project-with-phpcbf/foo/test.php')
AssertEqual
\ 'phpcbf_test',
\ ale#fixers#phpcbf#GetExecutable(bufnr(''))
Execute(project without phpcbf should use global):
- call ale#test#SetFilename('php_paths/project-without-phpcbf/foo/test.php')
+ call ale#test#SetFilename('../test-files/php/project-without-phpcbf/foo/test.php')
AssertEqual
\ 'phpcbf_test',
\ ale#fixers#phpcbf#GetExecutable(bufnr(''))
Execute(The phpcbf callback should return the correct default values):
- call ale#test#SetFilename('php_paths/project-with-phpcbf/foo/test.php')
+ call ale#test#SetFilename('../test-files/php/project-with-phpcbf/foo/test.php')
AssertEqual
- \ {'command': ale#Escape(ale#path#Simplify(g:dir . '/php_paths/project-with-phpcbf/vendor/bin/phpcbf')) . ' --stdin-path=%s -' },
+ \ {'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/php/project-with-phpcbf/vendor/bin/phpcbf')) . ' --stdin-path=%s -' },
\ ale#fixers#phpcbf#Fix(bufnr(''))
Execute(The phpcbf callback should include the phpcbf_standard option):
let g:ale_php_phpcbf_standard = 'phpcbf_ruleset.xml'
- call ale#test#SetFilename('php_paths/project-with-phpcbf/foo/test.php')
+ call ale#test#SetFilename('../test-files/php/project-with-phpcbf/foo/test.php')
AssertEqual
- \ {'command': ale#Escape(ale#path#Simplify(g:dir . '/php_paths/project-with-phpcbf/vendor/bin/phpcbf')) . ' --stdin-path=%s ' . '--standard=phpcbf_ruleset.xml' . ' -'},
+ \ {'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/php/project-with-phpcbf/vendor/bin/phpcbf')) . ' --stdin-path=%s ' . '--standard=phpcbf_ruleset.xml' . ' -'},
\ ale#fixers#phpcbf#Fix(bufnr(''))
Execute(User provided options should be used):
let g:ale_php_phpcbf_options = '--my-user-provided-option my-value'
- call ale#test#SetFilename('php_paths/project-with-phpcbf/foo/test.php')
+ call ale#test#SetFilename('../test-files/php/project-with-phpcbf/foo/test.php')
AssertEqual
- \ {'command': ale#Escape(ale#path#Simplify(g:dir . '/php_paths/project-with-phpcbf/vendor/bin/phpcbf')) . ' --stdin-path=%s ' . ale#Pad('--my-user-provided-option my-value') . ' -'},
+ \ {'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/php/project-with-phpcbf/vendor/bin/phpcbf')) . ' --stdin-path=%s ' . ale#Pad('--my-user-provided-option my-value') . ' -'},
\ ale#fixers#phpcbf#Fix(bufnr(''))
@@ -85,39 +85,39 @@ After:
call ale#test#RestoreDirectory()
Execute(project with phpcbf should use local by default):
- call ale#test#SetFilename('php_paths/project-with-phpcbf/foo/test.php')
+ call ale#test#SetFilename('../test-files/php/project-with-phpcbf/foo/test.php')
AssertEqual
- \ ale#path#Simplify(g:dir . '/php_paths/project-with-phpcbf/vendor/bin/phpcbf'),
+ \ ale#path#Simplify(g:dir . '/../test-files/php/project-with-phpcbf/vendor/bin/phpcbf'),
\ ale#fixers#phpcbf#GetExecutable(bufnr(''))
Execute(use-global should override local detection):
let g:ale_php_phpcbf_use_global = 1
- call ale#test#SetFilename('php_paths/project-with-phpcbf/foo/test.php')
+ call ale#test#SetFilename('../test-files/php/project-with-phpcbf/foo/test.php')
AssertEqual
\ 'phpcbf_test',
\ ale#fixers#phpcbf#GetExecutable(bufnr(''))
Execute(project without phpcbf should use global):
- call ale#test#SetFilename('php_paths/project-without-phpcbf/foo/test.php')
+ call ale#test#SetFilename('../test-files/php/project-without-phpcbf/foo/test.php')
AssertEqual
\ 'phpcbf_test',
\ ale#fixers#phpcbf#GetExecutable(bufnr(''))
Execute(The phpcbf callback should return the correct default values):
- call ale#test#SetFilename('php_paths/project-with-phpcbf/foo/test.php')
+ call ale#test#SetFilename('../test-files/php/project-with-phpcbf/foo/test.php')
AssertEqual
- \ {'command': ale#Escape(ale#path#Simplify(g:dir . '/php_paths/project-with-phpcbf/vendor/bin/phpcbf')) . ' --stdin-path=%s -' },
+ \ {'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/php/project-with-phpcbf/vendor/bin/phpcbf')) . ' --stdin-path=%s -' },
\ ale#fixers#phpcbf#Fix(bufnr(''))
Execute(The phpcbf callback should include the phpcbf_standard option):
let g:ale_php_phpcbf_standard = 'phpcbf_ruleset.xml'
- call ale#test#SetFilename('php_paths/project-with-phpcbf/foo/test.php')
+ call ale#test#SetFilename('../test-files/php/project-with-phpcbf/foo/test.php')
AssertEqual
- \ {'command': ale#Escape(ale#path#Simplify(g:dir . '/php_paths/project-with-phpcbf/vendor/bin/phpcbf')) . ' --stdin-path=%s ' . '--standard=phpcbf_ruleset.xml' . ' -'},
+ \ {'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/php/project-with-phpcbf/vendor/bin/phpcbf')) . ' --stdin-path=%s ' . '--standard=phpcbf_ruleset.xml' . ' -'},
\ ale#fixers#phpcbf#Fix(bufnr(''))
diff --git a/test/fixers/test_prettier_eslint_fixer.callback.vader b/test/fixers/test_prettier_eslint_fixer.callback.vader
index 9bd6baf7..cfdd1c78 100644
--- a/test/fixers/test_prettier_eslint_fixer.callback.vader
+++ b/test/fixers/test_prettier_eslint_fixer.callback.vader
@@ -30,7 +30,7 @@ Execute(Additional options should be used when set):
\ }
Execute(--eslint-config-path should be set for 4.2.0 and up):
- call ale#test#SetFilename('eslint-test-files/react-app/foo/bar.js')
+ call ale#test#SetFilename('../test-files/eslint/react-app/foo/bar.js')
GivenCommandOutput ['4.2.0']
AssertFixer
@@ -39,12 +39,12 @@ Execute(--eslint-config-path should be set for 4.2.0 and up):
\ 'command':
\ ale#Escape('prettier-eslint')
\ . ' %t'
- \ . ' --eslint-config-path ' . ale#Escape(ale#path#Simplify(g:dir . '/eslint-test-files/react-app/.eslintrc.js'))
+ \ . ' --eslint-config-path ' . ale#Escape(ale#test#GetFilename('../test-files/eslint/react-app/.eslintrc.js'))
\ . ' --write'
\ }
Execute(--eslint-config-path shouldn't be used for older versions):
- call ale#test#SetFilename('eslint-test-files/react-app/foo/bar.js')
+ call ale#test#SetFilename('../test-files/eslint/react-app/foo/bar.js')
AssertFixer
\ {
@@ -68,14 +68,14 @@ Execute(The version check should be correct):
\]
Execute(The new --stdin-filepath option should be used when the version is new enough):
- call ale#test#SetFilename('eslint-test-files/react-app/foo/bar.js')
+ call ale#test#SetFilename('../test-files/eslint/react-app/foo/bar.js')
GivenCommandOutput ['4.4.0']
AssertFixer
\ {
\ 'cwd': '%s:h',
\ 'command': ale#Escape('prettier-eslint')
- \ . ' --eslint-config-path ' . ale#Escape(ale#path#Simplify(g:dir . '/eslint-test-files/react-app/.eslintrc.js'))
+ \ . ' --eslint-config-path ' . ale#Escape(ale#test#GetFilename('../test-files/eslint/react-app/.eslintrc.js'))
\ . ' --stdin-filepath %s --stdin',
\ }
diff --git a/test/fixers/test_prettier_fixer_callback.vader b/test/fixers/test_prettier_fixer_callback.vader
index 0857c4cb..7e7b661d 100644
--- a/test/fixers/test_prettier_fixer_callback.vader
+++ b/test/fixers/test_prettier_fixer_callback.vader
@@ -12,7 +12,7 @@ After:
call ale#assert#TearDownFixerTest()
Execute(The prettier callback should return the correct default values):
- call ale#test#SetFilename('../prettier-test-files/testfile.js')
+ call ale#test#SetFilename('../test-files/prettier/testfile.js')
AssertFixer
\ {
@@ -24,7 +24,7 @@ Execute(The prettier callback should return the correct default values):
Execute(The --config option should not be set automatically):
let g:ale_javascript_prettier_use_local_config = 1
- call ale#test#SetFilename('../prettier-test-files/with_config/testfile.js')
+ call ale#test#SetFilename('../test-files/prettier/with_config/testfile.js')
AssertFixer
\ {
@@ -36,7 +36,7 @@ Execute(The --config option should not be set automatically):
Execute(The prettier callback should include custom prettier options):
let g:ale_javascript_prettier_options = '--no-semi'
- call ale#test#SetFilename('../prettier-test-files/with_config/testfile.js')
+ call ale#test#SetFilename('../test-files/prettier/with_config/testfile.js')
AssertFixer
\ {
@@ -48,7 +48,7 @@ Execute(The prettier callback should include custom prettier options):
\ }
Execute(The version check should be correct):
- call ale#test#SetFilename('../prettier-test-files/testfile.js')
+ call ale#test#SetFilename('../test-files/prettier/testfile.js')
AssertFixer [
\ ale#Escape('prettier') . ' --version',
@@ -57,7 +57,7 @@ Execute(The version check should be correct):
Execute(--stdin-filepath should be used when prettier is new enough):
let g:ale_javascript_prettier_options = '--no-semi'
- call ale#test#SetFilename('../prettier-test-files/with_config/testfile.js')
+ call ale#test#SetFilename('../test-files/prettier/with_config/testfile.js')
GivenCommandOutput ['1.6.0']
AssertFixer
@@ -69,7 +69,7 @@ Execute(--stdin-filepath should be used when prettier is new enough):
\ }
Execute(The version number should be cached):
- call ale#test#SetFilename('../prettier-test-files/with_config/testfile.js')
+ call ale#test#SetFilename('../test-files/prettier/with_config/testfile.js')
GivenCommandOutput ['1.6.0']
AssertFixer
@@ -88,7 +88,7 @@ Execute(The version number should be cached):
\ }
Execute(Should set --parser to `babylon` by default, < 1.16.0):
- call ale#test#SetFilename('../prettier-test-files/testfile')
+ call ale#test#SetFilename('../test-files/prettier/testfile')
set filetype=javascript
@@ -102,7 +102,7 @@ Execute(Should set --parser to `babylon` by default, < 1.16.0):
\ }
Execute(Should set --parser to `babel` by default, >= 1.16.0):
- call ale#test#SetFilename('../prettier-test-files/testfile')
+ call ale#test#SetFilename('../test-files/prettier/testfile')
set filetype=javascript
@@ -116,7 +116,7 @@ Execute(Should set --parser to `babel` by default, >= 1.16.0):
\ }
Execute(Should set --parser based on filetype, TypeScript):
- call ale#test#SetFilename('../prettier-test-files/testfile')
+ call ale#test#SetFilename('../test-files/prettier/testfile')
set filetype=typescript
@@ -130,7 +130,7 @@ Execute(Should set --parser based on filetype, TypeScript):
\ }
Execute(Should set --parser based on filetype, CSS):
- call ale#test#SetFilename('../prettier-test-files/testfile')
+ call ale#test#SetFilename('../test-files/prettier/testfile')
set filetype=css
@@ -144,7 +144,7 @@ Execute(Should set --parser based on filetype, CSS):
\ }
Execute(Should set --parser based on filetype, LESS):
- call ale#test#SetFilename('../prettier-test-files/testfile')
+ call ale#test#SetFilename('../test-files/prettier/testfile')
set filetype=less
@@ -158,7 +158,7 @@ Execute(Should set --parser based on filetype, LESS):
\ }
Execute(Should set --parser based on filetype, SCSS):
- call ale#test#SetFilename('../prettier-test-files/testfile')
+ call ale#test#SetFilename('../test-files/prettier/testfile')
set filetype=scss
@@ -172,7 +172,7 @@ Execute(Should set --parser based on filetype, SCSS):
\ }
Execute(Should set --parser based on filetype, JSON):
- call ale#test#SetFilename('../prettier-test-files/testfile')
+ call ale#test#SetFilename('../test-files/prettier/testfile')
set filetype=json
@@ -186,7 +186,7 @@ Execute(Should set --parser based on filetype, JSON):
\ }
Execute(Should set --parser based on filetype, JSON5):
- call ale#test#SetFilename('../prettier-test-files/testfile')
+ call ale#test#SetFilename('../test-files/prettier/testfile')
set filetype=json5
@@ -200,7 +200,7 @@ Execute(Should set --parser based on filetype, JSON5):
\ }
Execute(Should set --parser based on filetype, GraphQL):
- call ale#test#SetFilename('../prettier-test-files/testfile')
+ call ale#test#SetFilename('../test-files/prettier/testfile')
set filetype=graphql
@@ -214,7 +214,7 @@ Execute(Should set --parser based on filetype, GraphQL):
\ }
Execute(Should set --parser based on filetype, Markdown):
- call ale#test#SetFilename('../prettier-test-files/testfile')
+ call ale#test#SetFilename('../test-files/prettier/testfile')
set filetype=markdown
@@ -228,7 +228,7 @@ Execute(Should set --parser based on filetype, Markdown):
\ }
Execute(Should set --parser based on filetype, Vue):
- call ale#test#SetFilename('../prettier-test-files/testfile')
+ call ale#test#SetFilename('../test-files/prettier/testfile')
set filetype=vue
@@ -242,7 +242,7 @@ Execute(Should set --parser based on filetype, Vue):
\ }
Execute(Should set --parser based on filetype, YAML):
- call ale#test#SetFilename('../prettier-test-files/testfile')
+ call ale#test#SetFilename('../test-files/prettier/testfile')
set filetype=yaml
@@ -256,7 +256,7 @@ Execute(Should set --parser based on filetype, YAML):
\ }
Execute(Should set --parser based on filetype, HTML):
- call ale#test#SetFilename('../prettier-test-files/testfile')
+ call ale#test#SetFilename('../test-files/prettier/testfile')
set filetype=html
@@ -270,7 +270,7 @@ Execute(Should set --parser based on filetype, HTML):
\ }
Execute(Should set --parser based on filetype, Ruby):
- call ale#test#SetFilename('../prettier-test-files/testfile')
+ call ale#test#SetFilename('../test-files/prettier/testfile')
set filetype=ruby
@@ -284,7 +284,7 @@ Execute(Should set --parser based on filetype, Ruby):
\ }
Execute(Should set --parser based on first filetype of multiple filetypes):
- call ale#test#SetFilename('../prettier-test-files/testfile')
+ call ale#test#SetFilename('../test-files/prettier/testfile')
set filetype=css.scss
@@ -298,7 +298,7 @@ Execute(Should set --parser based on first filetype of multiple filetypes):
\ }
Execute(Should set --parser for experimental language, Handlebars):
- call ale#test#SetFilename('../prettier-test-files/testfile.hbs')
+ call ale#test#SetFilename('../test-files/prettier/testfile.hbs')
set filetype=html.handlebars
@@ -312,7 +312,7 @@ Execute(Should set --parser for experimental language, Handlebars):
\ }
Execute(Changes to directory where .prettierignore is found):
- call ale#test#SetFilename('../prettier-test-files/with_prettierignore/src/testfile.js')
+ call ale#test#SetFilename('../test-files/prettier/with_prettierignore/src/testfile.js')
GivenCommandOutput ['1.6.0']
AssertFixer
diff --git a/test/fixers/test_prettier_standard_callback.vader b/test/fixers/test_prettier_standard_callback.vader
index ab33fe20..d0cf4ecf 100644
--- a/test/fixers/test_prettier_standard_callback.vader
+++ b/test/fixers/test_prettier_standard_callback.vader
@@ -9,7 +9,7 @@ After:
call ale#assert#TearDownFixerTest()
Execute(The prettier callback should return the correct default values):
- call ale#test#SetFilename('../prettier-test-files/testfile.js')
+ call ale#test#SetFilename('../test-files/prettier/testfile.js')
AssertFixer
\ {
diff --git a/test/fixers/test_puppetlint_fixer_callback.vader b/test/fixers/test_puppetlint_fixer_callback.vader
index 224d72ab..5ccb0137 100644
--- a/test/fixers/test_puppetlint_fixer_callback.vader
+++ b/test/fixers/test_puppetlint_fixer_callback.vader
@@ -17,7 +17,7 @@ After:
call ale#test#RestoreDirectory()
Execute(The puppetlint callback should return the correct default values):
- silent execute 'file ' . fnameescape(g:dir . '/puppet_paths/dummy.pp')
+ silent execute 'file ' . fnameescape(g:dir . '/../test-files/puppet/dummy.pp')
AssertEqual
\ {'read_temporary_file': 1,
diff --git a/test/fixers/test_refmt_fixer_callback.vader b/test/fixers/test_refmt_fixer_callback.vader
index 9ec331e4..01b56bee 100644
--- a/test/fixers/test_refmt_fixer_callback.vader
+++ b/test/fixers/test_refmt_fixer_callback.vader
@@ -14,7 +14,7 @@ After:
call ale#test#RestoreDirectory()
Execute(The refmt callback should return the correct default values):
- call ale#test#SetFilename('../reasonml_files/testfile.re')
+ call ale#test#SetFilename('../test-files/reasonml/testfile.re')
AssertEqual
\ {
@@ -27,7 +27,7 @@ Execute(The refmt callback should return the correct default values):
Execute(The refmt callback should include custom refmt options):
let g:ale_reasonml_refmt_options = "-w 80"
- call ale#test#SetFilename('../reasonml_files/testfile.re')
+ call ale#test#SetFilename('../test-files/reasonml/testfile.re')
AssertEqual
\ {
diff --git a/test/fixers/test_reorder_python_imports_fixer_callback.vader b/test/fixers/test_reorder_python_imports_fixer_callback.vader
index 30b64eb8..74f3715d 100644
--- a/test/fixers/test_reorder_python_imports_fixer_callback.vader
+++ b/test/fixers/test_reorder_python_imports_fixer_callback.vader
@@ -25,10 +25,10 @@ Execute(The reorder_python_imports callback should return the correct default va
\ 0,
\ ale#fixers#reorder_python_imports#Fix(bufnr(''))
- silent execute 'file ' . fnameescape(g:dir . '/python_paths/with_virtualenv/subdir/foo/bar.py')
+ silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py')
AssertEqual
\ {
- \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/python_paths/with_virtualenv/env/'
+ \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/'
\ . b:bin_dir . '/reorder-python-imports')) . ' -',
\ },
\ ale#fixers#reorder_python_imports#Fix(bufnr(''))
@@ -40,10 +40,10 @@ Execute(The reorder_python_imports callback should respect custom options):
\ 0,
\ ale#fixers#reorder_python_imports#Fix(bufnr(''))
- silent execute 'file ' . fnameescape(g:dir . '/python_paths/with_virtualenv/subdir/foo/bar.py')
+ silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py')
AssertEqual
\ {
- \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/python_paths/with_virtualenv/env/'
+ \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/'
\ . b:bin_dir . '/reorder-python-imports')) . ' --py3-plus -',
\ },
\ ale#fixers#reorder_python_imports#Fix(bufnr(''))
diff --git a/test/fixers/test_rubocop_fixer_callback.vader b/test/fixers/test_rubocop_fixer_callback.vader
index 84579d31..2029df23 100644
--- a/test/fixers/test_rubocop_fixer_callback.vader
+++ b/test/fixers/test_rubocop_fixer_callback.vader
@@ -17,7 +17,7 @@ After:
call ale#test#RestoreDirectory()
Execute(The rubocop callback should return the correct default values):
- call ale#test#SetFilename('ruby_paths/dummy.rb')
+ call ale#test#SetFilename('../test-files/ruby/dummy.rb')
AssertEqual
\ {
@@ -28,26 +28,26 @@ Execute(The rubocop callback should return the correct default values):
\ ale#fixers#rubocop#Fix(bufnr(''))
Execute(The rubocop callback should include configuration files):
- call ale#test#SetFilename('ruby_paths/with_config/dummy.rb')
+ call ale#test#SetFilename('../test-files/ruby/with_config/dummy.rb')
AssertEqual
\ {
\ 'process_with': 'ale#fixers#rubocop#PostProcess',
\ 'command': ale#Escape(g:ale_ruby_rubocop_executable)
- \ . ' --config ' . ale#Escape(ale#path#Simplify(g:dir . '/ruby_paths/with_config/.rubocop.yml'))
+ \ . ' --config ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/ruby/with_config/.rubocop.yml'))
\ . ' --auto-correct --force-exclusion --stdin %s',
\ },
\ ale#fixers#rubocop#Fix(bufnr(''))
Execute(The rubocop callback should include custom rubocop options):
let g:ale_ruby_rubocop_options = '--except Lint/Debugger'
- call ale#test#SetFilename('ruby_paths/with_config/dummy.rb')
+ call ale#test#SetFilename('../test-files/ruby/with_config/dummy.rb')
AssertEqual
\ {
\ 'process_with': 'ale#fixers#rubocop#PostProcess',
\ 'command': ale#Escape(g:ale_ruby_rubocop_executable)
- \ . ' --config ' . ale#Escape(ale#path#Simplify(g:dir . '/ruby_paths/with_config/.rubocop.yml'))
+ \ . ' --config ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/ruby/with_config/.rubocop.yml'))
\ . ' --except Lint/Debugger'
\ . ' --auto-correct --force-exclusion --stdin %s',
\ },
@@ -55,13 +55,13 @@ Execute(The rubocop callback should include custom rubocop options):
Execute(The rubocop callback should use auto-correct-all option when set):
let g:ale_ruby_rubocop_auto_correct_all = 1
- call ale#test#SetFilename('ruby_paths/with_config/dummy.rb')
+ call ale#test#SetFilename('../test-files/ruby/with_config/dummy.rb')
AssertEqual
\ {
\ 'process_with': 'ale#fixers#rubocop#PostProcess',
\ 'command': ale#Escape(g:ale_ruby_rubocop_executable)
- \ . ' --config ' . ale#Escape(ale#path#Simplify(g:dir . '/ruby_paths/with_config/.rubocop.yml'))
+ \ . ' --config ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/ruby/with_config/.rubocop.yml'))
\ . ' --auto-correct-all --force-exclusion --stdin %s'
\ },
\ ale#fixers#rubocop#Fix(bufnr(''))
diff --git a/test/fixers/test_rufo_fixer_callback.vader b/test/fixers/test_rufo_fixer_callback.vader
index 98108efc..54361784 100644
--- a/test/fixers/test_rufo_fixer_callback.vader
+++ b/test/fixers/test_rufo_fixer_callback.vader
@@ -14,14 +14,14 @@ After:
Execute(The rufo command should contain `bundle exec` when executable is `bundle`):
let g:ale_ruby_rufo_executable = 'bundle'
- call ale#test#SetFilename('ruby_paths/dummy.rb')
+ call ale#test#SetFilename('../test-files/ruby/dummy.rb')
AssertEqual
\ ale#Escape('bundle') . ' exec rufo %t',
\ ale#fixers#rufo#GetCommand(bufnr(''))
Execute(The rufo callback should return the correct default values):
- call ale#test#SetFilename('ruby_paths/dummy.rb')
+ call ale#test#SetFilename('../test-files/ruby/dummy.rb')
AssertEqual
\ {
diff --git a/test/fixers/test_rustfmt_fixer_callback.vader b/test/fixers/test_rustfmt_fixer_callback.vader
index 95c78dea..98761c94 100644
--- a/test/fixers/test_rustfmt_fixer_callback.vader
+++ b/test/fixers/test_rustfmt_fixer_callback.vader
@@ -1,34 +1,16 @@
Before:
- Save g:ale_rust_rustfmt_executable
- Save g:ale_rust_rustfmt_options
-
- " Use an invalid global executable, so we don't match it.
- let g:ale_rust_rustfmt_executable = 'xxxinvalid'
- let g:ale_rust_rustfmt_options = ''
-
- call ale#test#SetDirectory('/testplugin/test/fixers')
+ call ale#assert#SetUpFixerTest('rust', 'rustfmt')
After:
- Restore
-
- call ale#test#RestoreDirectory()
+ call ale#assert#TearDownFixerTest()
Execute(The rustfmt callback should return the correct default values):
- call ale#test#SetFilename('../rust_files/testfile.rs')
+ call ale#test#SetFilename('../test-files/rust/testfile.rs')
- AssertEqual
- \ {
- \ 'command': ale#Escape('xxxinvalid'),
- \ },
- \ ale#fixers#rustfmt#Fix(bufnr(''))
+ AssertFixer {'command': ale#Escape('rustfmt')}
Execute(The rustfmt callback should include custom rustfmt options):
let g:ale_rust_rustfmt_options = "--skip-children"
- call ale#test#SetFilename('../rust_files/testfile.rs')
+ call ale#test#SetFilename('../test-files/rust/testfile.rs')
- AssertEqual
- \ {
- \ 'command': ale#Escape('xxxinvalid')
- \ . ' ' . g:ale_rust_rustfmt_options,
- \ },
- \ ale#fixers#rustfmt#Fix(bufnr(''))
+ AssertFixer {'command': ale#Escape('rustfmt') . ' ' . g:ale_rust_rustfmt_options}
diff --git a/test/fixers/test_scalafmt_fixer_callback.vader b/test/fixers/test_scalafmt_fixer_callback.vader
index d82fda43..94f544a1 100644
--- a/test/fixers/test_scalafmt_fixer_callback.vader
+++ b/test/fixers/test_scalafmt_fixer_callback.vader
@@ -17,7 +17,7 @@ After:
call ale#test#RestoreDirectory()
Execute(The scalafmt callback should return the correct default values):
- call ale#test#SetFilename('scala_paths/dummy.scala')
+ call ale#test#SetFilename('../test-files/scala/dummy.scala')
AssertEqual
\ {
@@ -29,7 +29,7 @@ Execute(The scalafmt callback should return the correct default values):
Execute(The scalafmt callback should use ng with scalafmt automatically):
let g:ale_scala_scalafmt_executable = 'ng'
- call ale#test#SetFilename('scala_paths/dummy.scala')
+ call ale#test#SetFilename('../test-files/scala/dummy.scala')
AssertEqual
\ {
@@ -42,7 +42,7 @@ Execute(The scalafmt callback should use ng with scalafmt automatically):
Execute(The scalafmt callback should include custom scalafmt options):
let g:ale_scala_scalafmt_options = '--diff'
- call ale#test#SetFilename('scala_paths/dummy.scala')
+ call ale#test#SetFilename('../test-files/scala/dummy.scala')
AssertEqual
\ {
@@ -56,7 +56,7 @@ Execute(The scalafmt callback should include custom scalafmt options):
Execute(The scalafmt callback should include custom scalafmt options and use ng with scalafmt):
let g:ale_scala_scalafmt_options = '--diff'
let g:ale_scala_scalafmt_executable = 'ng'
- call ale#test#SetFilename('scala_paths/dummy.scala')
+ call ale#test#SetFilename('../test-files/scala/dummy.scala')
AssertEqual
\ {
diff --git a/test/fixers/test_sorbet_fixer_callback.vader b/test/fixers/test_sorbet_fixer_callback.vader
index 71870e4c..deb2b4e0 100644
--- a/test/fixers/test_sorbet_fixer_callback.vader
+++ b/test/fixers/test_sorbet_fixer_callback.vader
@@ -18,7 +18,7 @@ After:
call ale#test#RestoreDirectory()
Execute(The sorbet callback should return the correct default values):
- call ale#test#SetFilename('ruby_paths/dummy.rb')
+ call ale#test#SetFilename('../test-files/ruby/dummy.rb')
AssertEqual
\ {
@@ -30,7 +30,7 @@ Execute(The sorbet callback should return the correct default values):
Execute(The sorbet callback should include custom sorbet options):
let g:ale_ruby_sorbet_options = '--enable-experimental-lsp-hover'
- call ale#test#SetFilename('ruby_paths/with_config/dummy.rb')
+ call ale#test#SetFilename('../test-files/ruby/with_config/dummy.rb')
AssertEqual
\ {
diff --git a/test/fixers/test_standard_fixer_callback.vader b/test/fixers/test_standard_fixer_callback.vader
index f5e9c487..9f5eb0e9 100644
--- a/test/fixers/test_standard_fixer_callback.vader
+++ b/test/fixers/test_standard_fixer_callback.vader
@@ -8,13 +8,13 @@ After:
call ale#test#RestoreDirectory()
Execute(The executable path should be correct):
- call ale#test#SetFilename('../eslint-test-files/react-app/subdir/testfile.js')
+ call ale#test#SetFilename('../test-files/eslint/react-app/subdir/testfile.js')
AssertEqual
\ {
\ 'read_temporary_file': 1,
\ 'command': (has('win32') ? 'node.exe ' : '')
- \ . ale#Escape(ale#path#Simplify(g:dir . '/../eslint-test-files/react-app/node_modules/standard/bin/cmd.js'))
+ \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/standard/bin/cmd.js'))
\ . ' --fix --stdin < %s > %t',
\ },
\ ale#fixers#standard#Fix(bufnr(''))
diff --git a/test/fixers/test_standardrb_fixer_callback.vader b/test/fixers/test_standardrb_fixer_callback.vader
index d315651f..31684c29 100644
--- a/test/fixers/test_standardrb_fixer_callback.vader
+++ b/test/fixers/test_standardrb_fixer_callback.vader
@@ -17,7 +17,7 @@ After:
call ale#test#RestoreDirectory()
Execute(The standardrb callback should return the correct default values):
- call ale#test#SetFilename('ruby_paths/dummy.rb')
+ call ale#test#SetFilename('../test-files/ruby/dummy.rb')
AssertEqual
\ {
@@ -28,26 +28,26 @@ Execute(The standardrb callback should return the correct default values):
\ ale#fixers#standardrb#Fix(bufnr(''))
Execute(The standardrb callback should include configuration files):
- call ale#test#SetFilename('ruby_paths/with_config/dummy.rb')
+ call ale#test#SetFilename('../test-files/ruby/with_config/dummy.rb')
AssertEqual
\ {
\ 'process_with': 'ale#fixers#rubocop#PostProcess',
\ 'command': ale#Escape(g:ale_ruby_standardrb_executable)
- \ . ' --config ' . ale#Escape(ale#path#Simplify(g:dir . '/ruby_paths/with_config/.standard.yml'))
+ \ . ' --config ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/ruby/with_config/.standard.yml'))
\ . ' --fix --force-exclusion --stdin %s',
\ },
\ ale#fixers#standardrb#Fix(bufnr(''))
Execute(The standardrb callback should include custom rubocop options):
let g:ale_ruby_standardrb_options = '--except Lint/Debugger'
- call ale#test#SetFilename('ruby_paths/with_config/dummy.rb')
+ call ale#test#SetFilename('../test-files/ruby/with_config/dummy.rb')
AssertEqual
\ {
\ 'process_with': 'ale#fixers#rubocop#PostProcess',
\ 'command': ale#Escape(g:ale_ruby_standardrb_executable)
- \ . ' --config ' . ale#Escape(ale#path#Simplify(g:dir . '/ruby_paths/with_config/.standard.yml'))
+ \ . ' --config ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/ruby/with_config/.standard.yml'))
\ . ' --except Lint/Debugger'
\ . ' --fix --force-exclusion --stdin %s',
\ },
diff --git a/test/fixers/test_stylelint_fixer_callback.vader b/test/fixers/test_stylelint_fixer_callback.vader
index 95f91f91..3c843975 100644
--- a/test/fixers/test_stylelint_fixer_callback.vader
+++ b/test/fixers/test_stylelint_fixer_callback.vader
@@ -9,28 +9,28 @@ After:
call ale#assert#TearDownFixerTest()
Execute(The stylelint callback should return the correct default values):
- call ale#test#SetFilename('../eslint-test-files/react-app/subdir/testfile.css')
+ call ale#test#SetFilename('../test-files/eslint/react-app/subdir/testfile.css')
AssertFixer
\ {
\ 'read_temporary_file': 1,
\ 'cwd': '%s:h',
\ 'command': (has('win32') ? 'node.exe ' : '')
- \ . ale#Escape(ale#path#Simplify(g:dir . '/../eslint-test-files/react-app/node_modules/stylelint/bin/stylelint.js'))
+ \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/stylelint/bin/stylelint.js'))
\ . ' %t'
\ . ' --fix',
\ }
Execute(The stylelint callback should include custom stylelint options):
let g:ale_stylelint_options = '--cache'
- call ale#test#SetFilename('../eslint-test-files/react-app/subdir/testfile.css')
+ call ale#test#SetFilename('../test-files/eslint/react-app/subdir/testfile.css')
AssertFixer
\ {
\ 'read_temporary_file': 1,
\ 'cwd': '%s:h',
\ 'command': (has('win32') ? 'node.exe ' : '')
- \ . ale#Escape(ale#path#Simplify(g:dir . '/../eslint-test-files/react-app/node_modules/stylelint/bin/stylelint.js'))
+ \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/stylelint/bin/stylelint.js'))
\ . ' %t'
\ . ' --cache'
\ . ' --fix',
diff --git a/test/fixers/test_swiftformat_fixer_callback.vader b/test/fixers/test_swiftformat_fixer_callback.vader
index e3674ded..d307c2b1 100644
--- a/test/fixers/test_swiftformat_fixer_callback.vader
+++ b/test/fixers/test_swiftformat_fixer_callback.vader
@@ -15,7 +15,7 @@ After:
call ale#test#RestoreDirectory()
Execute(The swiftformat callback should return the correct default values):
- call ale#test#SetFilename('swift_paths/dummy.swift')
+ call ale#test#SetFilename('../test-files/swift/dummy.swift')
AssertEqual
\ {
@@ -26,7 +26,7 @@ Execute(The swiftformat callback should return the correct default values):
\ ale#fixers#swiftformat#Fix(bufnr(''))
Execute(The swiftformat callback should include any additional options):
- call ale#test#SetFilename('swift_paths/dummy.swift')
+ call ale#test#SetFilename('../test-files/swift/dummy.swift')
let g:ale_swift_swiftformat_options = '--some-option'
AssertEqual
diff --git a/test/fixers/test_textlint_fixer_callback.vader b/test/fixers/test_textlint_fixer_callback.vader
index 2848cfa5..5b6c5b7a 100644
--- a/test/fixers/test_textlint_fixer_callback.vader
+++ b/test/fixers/test_textlint_fixer_callback.vader
@@ -16,7 +16,7 @@ After:
call ale#test#RestoreDirectory()
Execute(The textlint callback should return the correct default values):
- call ale#test#SetFilename('../markdown_files/testfile.md')
+ call ale#test#SetFilename('../test-files/markdown/testfile.md')
AssertEqual
\ {
@@ -29,7 +29,7 @@ Execute(The textlint callback should return the correct default values):
Execute(The textlint callback should include custom textlint options):
let g:ale_textlint_options = "--quiet"
- call ale#test#SetFilename('../markdown_files/testfile.md')
+ call ale#test#SetFilename('../test-files/markdown/testfile.md')
AssertEqual
\ {
diff --git a/test/fixers/test_tidy_fixer_callback.vader b/test/fixers/test_tidy_fixer_callback.vader
index 5677d8fd..a588d75e 100644
--- a/test/fixers/test_tidy_fixer_callback.vader
+++ b/test/fixers/test_tidy_fixer_callback.vader
@@ -1,7 +1,7 @@
Before:
Save g:ale_html_tidy_executable
- let g:ale_html_tidy_executable = 'tidy_paths/tidy'
+ let g:ale_html_tidy_executable = '../test-files/tidy/tidy'
call ale#test#SetDirectory('/testplugin/test/fixers')
@@ -23,7 +23,7 @@ Execute(The tidy callback should return 0 if tidy not found):
Execute(The tidy callback should return the correct default command):
AssertEqual
\ {
- \ 'command': ale#Escape('tidy_paths/tidy')
+ \ 'command': ale#Escape('../test-files/tidy/tidy')
\ . ' -q --tidy-mark no --show-errors 0 --show-warnings 0'
\ },
\ ale#fixers#tidy#Fix(bufnr(''))
diff --git a/test/fixers/test_tslint_fixer_callback.vader b/test/fixers/test_tslint_fixer_callback.vader
index a88992fa..2bcbddf7 100644
--- a/test/fixers/test_tslint_fixer_callback.vader
+++ b/test/fixers/test_tslint_fixer_callback.vader
@@ -20,7 +20,7 @@ After:
Execute(The tslint callback should return the correct default values):
let g:ale_typescript_tslint_config_path = 'tslint.json'
- call ale#test#SetFilename('../prettier-test-files/testfile.ts')
+ call ale#test#SetFilename('../test-files/prettier/testfile.ts')
AssertEqual
\ {
@@ -33,7 +33,7 @@ Execute(The tslint callback should return the correct default values):
Execute(The tslint callback should include custom tslint config option):
let g:ale_typescript_tslint_config_path = '.tslintrc'
- call ale#test#SetFilename('../prettier-test-files/testfile.ts')
+ call ale#test#SetFilename('../test-files/prettier/testfile.ts')
AssertEqual
\ {
diff --git a/test/fixers/test_uncrustify_fixer_callback.vader b/test/fixers/test_uncrustify_fixer_callback.vader
index 8ef4e79b..6c7f6b5d 100644
--- a/test/fixers/test_uncrustify_fixer_callback.vader
+++ b/test/fixers/test_uncrustify_fixer_callback.vader
@@ -15,7 +15,7 @@ After:
call ale#test#RestoreDirectory()
Execute(The clang-format callback should return the correct default values):
- call ale#test#SetFilename('c_paths/dummy.c')
+ call ale#test#SetFilename('../test-files/c/dummy.c')
AssertEqual
\ {
@@ -25,7 +25,7 @@ Execute(The clang-format callback should return the correct default values):
\ ale#fixers#uncrustify#Fix(bufnr(''))
Execute(The uncrustify callback should include any additional options):
- call ale#test#SetFilename('c_paths/dummy.c')
+ call ale#test#SetFilename('../test-files/c/dummy.c')
let b:ale_c_uncrustify_options = '--some-option'
AssertEqual
diff --git a/test/fixers/test_xo_fixer_callback.vader b/test/fixers/test_xo_fixer_callback.vader
index a473606e..fe2da8cc 100644
--- a/test/fixers/test_xo_fixer_callback.vader
+++ b/test/fixers/test_xo_fixer_callback.vader
@@ -7,38 +7,38 @@ After:
call ale#assert#TearDownFixerTest()
Execute(The xo callback should return the correct default values):
- call ale#test#SetFilename('../xo-test-files/monorepo/packages/a/index.js')
+ call ale#test#SetFilename('../test-files/xo/monorepo/packages/a/index.js')
AssertFixer
\ {
\ 'read_temporary_file': 1,
\ 'command': (has('win32') ? 'node.exe ' : '')
- \ . ale#Escape(ale#path#Simplify(g:dir . '/../xo-test-files/monorepo/node_modules/xo/cli.js'))
+ \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/xo/monorepo/node_modules/xo/cli.js'))
\ . ' --fix %t',
\ }
Execute(The xo callback should include custom xo options):
let g:ale_javascript_xo_options = '--space'
- call ale#test#SetFilename('../xo-test-files/monorepo/packages/a/index.js')
+ call ale#test#SetFilename('../test-files/xo/monorepo/packages/a/index.js')
AssertFixer
\ {
\ 'read_temporary_file': 1,
\ 'command': (has('win32') ? 'node.exe ' : '')
- \ . ale#Escape(ale#path#Simplify(g:dir . '/../xo-test-files/monorepo/node_modules/xo/cli.js'))
+ \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/xo/monorepo/node_modules/xo/cli.js'))
\ . ' --fix %t'
\ . ' --space',
\ }
Execute(--stdin should be used when xo is new enough):
let g:ale_javascript_xo_options = '--space'
- call ale#test#SetFilename('../xo-test-files/monorepo/packages/a/index.js')
+ call ale#test#SetFilename('../test-files/xo/monorepo/packages/a/index.js')
GivenCommandOutput ['0.30.0']
AssertFixer
\ {
\ 'command': (has('win32') ? 'node.exe ' : '')
- \ . ale#Escape(ale#path#Simplify(g:dir . '/../xo-test-files/monorepo/node_modules/xo/cli.js'))
+ \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/xo/monorepo/node_modules/xo/cli.js'))
\ . ' --stdin --stdin-filename %s'
\ . ' --fix'
\ . ' --space',
diff --git a/test/fixers/test_xots_fixer_callback.vader b/test/fixers/test_xots_fixer_callback.vader
index 5c7fa1d1..61a22e62 100644
--- a/test/fixers/test_xots_fixer_callback.vader
+++ b/test/fixers/test_xots_fixer_callback.vader
@@ -7,38 +7,38 @@ After:
call ale#assert#TearDownFixerTest()
Execute(The xo callback should return the correct default values):
- call ale#test#SetFilename('../xo-test-files/monorepo/packages/a/index.ts')
+ call ale#test#SetFilename('../test-files/xo/monorepo/packages/a/index.ts')
AssertFixer
\ {
\ 'read_temporary_file': 1,
\ 'command': (has('win32') ? 'node.exe ' : '')
- \ . ale#Escape(ale#path#Simplify(g:dir . '/../xo-test-files/monorepo/node_modules/xo/cli.js'))
+ \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/xo/monorepo/node_modules/xo/cli.js'))
\ . ' --fix %t',
\ }
Execute(The xo callback should include custom xo options):
let g:ale_typescript_xo_options = '--space'
- call ale#test#SetFilename('../xo-test-files/monorepo/packages/a/index.ts')
+ call ale#test#SetFilename('../test-files/xo/monorepo/packages/a/index.ts')
AssertFixer
\ {
\ 'read_temporary_file': 1,
\ 'command': (has('win32') ? 'node.exe ' : '')
- \ . ale#Escape(ale#path#Simplify(g:dir . '/../xo-test-files/monorepo/node_modules/xo/cli.js'))
+ \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/xo/monorepo/node_modules/xo/cli.js'))
\ . ' --fix %t'
\ . ' --space',
\ }
Execute(--stdin should be used when xo is new enough):
let g:ale_typescript_xo_options = '--space'
- call ale#test#SetFilename('../xo-test-files/monorepo/packages/a/index.ts')
+ call ale#test#SetFilename('../test-files/xo/monorepo/packages/a/index.ts')
GivenCommandOutput ['0.30.0']
AssertFixer
\ {
\ 'command': (has('win32') ? 'node.exe ' : '')
- \ . ale#Escape(ale#path#Simplify(g:dir . '/../xo-test-files/monorepo/node_modules/xo/cli.js'))
+ \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/xo/monorepo/node_modules/xo/cli.js'))
\ . ' --stdin --stdin-filename %s'
\ . ' --fix'
\ . ' --space',
diff --git a/test/fixers/test_yamlfix_fixer_callback.vader b/test/fixers/test_yamlfix_fixer_callback.vader
index 75b9f0ad..4038de16 100644
--- a/test/fixers/test_yamlfix_fixer_callback.vader
+++ b/test/fixers/test_yamlfix_fixer_callback.vader
@@ -16,22 +16,22 @@ Execute(The yamlfix callback should return the correct default values):
\ 0,
\ ale#fixers#yamlfix#Fix(bufnr(''))
- silent execute 'file ' . fnameescape(g:dir . '/python_paths/with_virtualenv/subdir/foo/bar.yaml')
+ silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.yaml')
AssertEqual
\ {
\ 'cwd': '%s:h',
- \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/python_paths/with_virtualenv/env/' . b:bin_dir . '/yamlfix')) . ' -',
+ \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/yamlfix')) . ' -',
\ },
\ ale#fixers#yamlfix#Fix(bufnr(''))
Execute(The yamlfix callback should respect custom options):
let g:ale_yaml_yamlfix_options = '--multi-line=3 --trailing-comma'
- silent execute 'file ' . fnameescape(g:dir . '/python_paths/with_virtualenv/subdir/foo/bar.yaml')
+ silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.yaml')
AssertEqual
\ {
\ 'cwd': '%s:h',
- \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/python_paths/with_virtualenv/env/' . b:bin_dir . '/yamlfix'))
+ \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/yamlfix'))
\ . ' --multi-line=3 --trailing-comma -',
\ },
\ ale#fixers#yamlfix#Fix(bufnr(''))
diff --git a/test/fixers/test_yapf_fixer_callback.vader b/test/fixers/test_yapf_fixer_callback.vader
index cfc508cc..2f7a12b7 100644
--- a/test/fixers/test_yapf_fixer_callback.vader
+++ b/test/fixers/test_yapf_fixer_callback.vader
@@ -23,20 +23,20 @@ Execute(The yapf callback should return the correct default values):
\ 0,
\ ale#fixers#yapf#Fix(bufnr(''))
- call ale#test#SetFilename('python_paths/with_virtualenv/subdir/foo/bar.py')
+ call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py')
AssertEqual
- \ {'command': ale#Escape(ale#path#Simplify(g:dir . '/python_paths/with_virtualenv/env/' . b:bin_dir . '/yapf'))},
+ \ {'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/yapf'))},
\ ale#fixers#yapf#Fix(bufnr(''))
\
Execute(The yapf should include the .style.yapf file if present):
- call ale#test#SetFilename('python_paths/with_virtualenv/dir_with_yapf_config/foo/bar.py')
+ call ale#test#SetFilename('../test-files/python/with_virtualenv/dir_with_yapf_config/foo/bar.py')
AssertEqual
\ {
\ 'command':
- \ ale#Escape(ale#path#Simplify(g:dir . '/python_paths/with_virtualenv/env/' . b:bin_dir . '/yapf'))
+ \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/yapf'))
\ . ' --no-local-style'
- \ . ' --style ' . ale#Escape(ale#path#Simplify(g:dir . '/python_paths/with_virtualenv/dir_with_yapf_config/.style.yapf')),
+ \ . ' --style ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/dir_with_yapf_config/.style.yapf')),
\ },
\ ale#fixers#yapf#Fix(bufnr(''))