From d4a14746cdcda99ec70915c5540962c85e33f661 Mon Sep 17 00:00:00 2001 From: Cyrille David Date: Mon, 31 Aug 2020 10:26:33 +0200 Subject: feat(template-lint): Read from stdin (#2622) * ember-template-lint: Lint from stdin * This feature has recently been implemented in ember-template-lint. * Refactor ember-template-lint executable * Fallback on a temporary file for old template-lint Co-authored-by: w0rp --- ...st_embertemplatelint_executable_detection.vader | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/test_embertemplatelint_executable_detection.vader (limited to 'test/test_embertemplatelint_executable_detection.vader') diff --git a/test/test_embertemplatelint_executable_detection.vader b/test/test_embertemplatelint_executable_detection.vader new file mode 100644 index 00000000..bd0f5dd9 --- /dev/null +++ b/test/test_embertemplatelint_executable_detection.vader @@ -0,0 +1,22 @@ +Before: + call ale#test#SetDirectory('/testplugin/test') + + runtime ale_linters/handlebars/embertemplatelint.vim + +After: + call ale#test#RestoreDirectory() + call ale#linter#Reset() + +Execute(ember-template-lint executables runs the right command): + call ale#test#SetFilename('ember-template-lint-test-files/app/template.hbs') + + AssertEqual + \ ale_linters#handlebars#embertemplatelint#GetCommand(bufnr(''), [2, 0, 0]), + \ '%e --json --filename %s' + +Execute(old ember-template-lint executables runs the right command): + call ale#test#SetFilename('ember-template-lint-test-files/app/template.hbs') + + AssertEqual + \ ale_linters#handlebars#embertemplatelint#GetCommand(bufnr(''), [1, 5, 0]), + \ '%e --json %t' -- cgit v1.2.3