Fix shell detection test, shellcheck function name has changed

This commit is contained in:
Ian2020 2020-04-28 18:20:10 +01:00
parent 3f34265151
commit f67cb56e5e
1 changed files with 14 additions and 14 deletions

View File

@ -15,7 +15,7 @@ Given(A file with a Bash hashbang):
Execute(/bin/bash should be detected appropriately):
AssertEqual 'bash', ale#handlers#sh#GetShellType(bufnr(''))
AssertEqual 'bash', ale_linters#sh#shell#GetExecutable(bufnr(''))
AssertEqual 'bash', ale_linters#sh#shellcheck#GetDialectArgument(bufnr(''))
AssertEqual 'bash', ale#handlers#shellcheck#GetDialectArgument(bufnr(''))
Given(A file with /bin/sh):
#!/usr/bin/env sh -eu --foobar
@ -23,7 +23,7 @@ Given(A file with /bin/sh):
Execute(/bin/sh should be detected appropriately):
AssertEqual 'sh', ale#handlers#sh#GetShellType(bufnr(''))
AssertEqual 'sh', ale_linters#sh#shell#GetExecutable(bufnr(''))
AssertEqual 'sh', ale_linters#sh#shellcheck#GetDialectArgument(bufnr(''))
AssertEqual 'sh', ale#handlers#shellcheck#GetDialectArgument(bufnr(''))
Given(A file with bash as an argument to env):
#!/usr/bin/env bash
@ -31,7 +31,7 @@ Given(A file with bash as an argument to env):
Execute(/usr/bin/env bash should be detected appropriately):
AssertEqual 'bash', ale#handlers#sh#GetShellType(bufnr(''))
AssertEqual 'bash', ale_linters#sh#shell#GetExecutable(bufnr(''))
AssertEqual 'bash', ale_linters#sh#shellcheck#GetDialectArgument(bufnr(''))
AssertEqual 'bash', ale#handlers#shellcheck#GetDialectArgument(bufnr(''))
Given(A file with a tcsh hash bang and arguments):
#!/usr/bin/env tcsh -eu --foobar
@ -39,7 +39,7 @@ Given(A file with a tcsh hash bang and arguments):
Execute(tcsh should be detected appropriately):
AssertEqual 'tcsh', ale#handlers#sh#GetShellType(bufnr(''))
AssertEqual 'tcsh', ale_linters#sh#shell#GetExecutable(bufnr(''))
AssertEqual 'tcsh', ale_linters#sh#shellcheck#GetDialectArgument(bufnr(''))
AssertEqual 'tcsh', ale#handlers#shellcheck#GetDialectArgument(bufnr(''))
Given(A file with a zsh hash bang and arguments):
#!/usr/bin/env zsh -eu --foobar
@ -47,7 +47,7 @@ Given(A file with a zsh hash bang and arguments):
Execute(zsh should be detected appropriately):
AssertEqual 'zsh', ale#handlers#sh#GetShellType(bufnr(''))
AssertEqual 'zsh', ale_linters#sh#shell#GetExecutable(bufnr(''))
AssertEqual 'zsh', ale_linters#sh#shellcheck#GetDialectArgument(bufnr(''))
AssertEqual 'zsh', ale#handlers#shellcheck#GetDialectArgument(bufnr(''))
Given(A file with a csh hash bang and arguments):
#!/usr/bin/env csh -eu --foobar
@ -55,7 +55,7 @@ Given(A file with a csh hash bang and arguments):
Execute(csh should be detected appropriately):
AssertEqual 'csh', ale#handlers#sh#GetShellType(bufnr(''))
AssertEqual 'csh', ale_linters#sh#shell#GetExecutable(bufnr(''))
AssertEqual 'csh', ale_linters#sh#shellcheck#GetDialectArgument(bufnr(''))
AssertEqual 'csh', ale#handlers#shellcheck#GetDialectArgument(bufnr(''))
Given(A file with a ksh hashbang):
#!/bin/ksh
@ -63,7 +63,7 @@ Given(A file with a ksh hashbang):
Execute(/bin/ksh should be detected appropriately):
AssertEqual 'ksh', ale#handlers#sh#GetShellType(bufnr(''))
AssertEqual 'ksh', ale_linters#sh#shell#GetExecutable(bufnr(''))
AssertEqual 'ksh', ale_linters#sh#shellcheck#GetDialectArgument(bufnr(''))
AssertEqual 'ksh', ale#handlers#shellcheck#GetDialectArgument(bufnr(''))
Given(A file with a ksh as an argument to env):
#!/usr/bin/env ksh
@ -71,7 +71,7 @@ Given(A file with a ksh as an argument to env):
Execute(ksh should be detected appropriately):
AssertEqual 'ksh', ale#handlers#sh#GetShellType(bufnr(''))
AssertEqual 'ksh', ale_linters#sh#shell#GetExecutable(bufnr(''))
AssertEqual 'ksh', ale_linters#sh#shellcheck#GetDialectArgument(bufnr(''))
AssertEqual 'ksh', ale#handlers#shellcheck#GetDialectArgument(bufnr(''))
Given(A file with a sh hash bang and arguments):
#!/usr/bin/env sh -eu --foobar
@ -79,24 +79,24 @@ Given(A file with a sh hash bang and arguments):
Execute(sh should be detected appropriately):
AssertEqual 'sh', ale#handlers#sh#GetShellType(bufnr(''))
AssertEqual 'sh', ale_linters#sh#shell#GetExecutable(bufnr(''))
AssertEqual 'sh', ale_linters#sh#shellcheck#GetDialectArgument(bufnr(''))
AssertEqual 'sh', ale#handlers#shellcheck#GetDialectArgument(bufnr(''))
Given(A file without a hashbang):
Execute(The bash dialect should be used for shellcheck if b:is_bash is 1):
let b:is_bash = 1
AssertEqual 'bash', ale_linters#sh#shellcheck#GetDialectArgument(bufnr(''))
AssertEqual 'bash', ale#handlers#shellcheck#GetDialectArgument(bufnr(''))
Execute(The sh dialect should be used for shellcheck if b:is_sh is 1):
let b:is_sh = 1
AssertEqual 'sh', ale_linters#sh#shellcheck#GetDialectArgument(bufnr(''))
AssertEqual 'sh', ale#handlers#shellcheck#GetDialectArgument(bufnr(''))
Execute(The ksh dialect should be used for shellcheck if b:is_kornshell is 1):
let b:is_kornshell = 1
AssertEqual 'ksh', ale_linters#sh#shellcheck#GetDialectArgument(bufnr(''))
AssertEqual 'ksh', ale#handlers#shellcheck#GetDialectArgument(bufnr(''))
Given(A file with /bin/ash):
#!/bin/ash
@ -106,7 +106,7 @@ Execute(The ash dialect should be used for the shell and the base function):
AssertEqual 'ash', ale_linters#sh#shell#GetExecutable(bufnr(''))
Execute(dash should be used for shellcheck, which has no ash dialect):
AssertEqual 'dash', ale_linters#sh#shellcheck#GetDialectArgument(bufnr(''))
AssertEqual 'dash', ale#handlers#shellcheck#GetDialectArgument(bufnr(''))
Given(A file with /bin/dash):
#!/bin/dash
@ -116,4 +116,4 @@ Execute(The dash dialect should be used for the shell and the base function):
AssertEqual 'dash', ale_linters#sh#shell#GetExecutable(bufnr(''))
Execute(dash should be used for shellcheck):
AssertEqual 'dash', ale_linters#sh#shellcheck#GetDialectArgument(bufnr(''))
AssertEqual 'dash', ale#handlers#shellcheck#GetDialectArgument(bufnr(''))