mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-16 10:03:08 -07:00
Attempted bats @test support
This commit is contained in:
parent
47fd16b8e8
commit
ad1a0da954
5 changed files with 37 additions and 1 deletions
|
@ -1934,6 +1934,16 @@ readBraceGroup = called "brace group" $ do
|
|||
fail "Missing '}'"
|
||||
return $ T_BraceGroup id list
|
||||
|
||||
prop_readBatsTest = isOk readBatsTest "@test 'can parse' {\n true\n}"
|
||||
readBatsTest = called "bats @test" $ do
|
||||
id <- getNextId
|
||||
try $ string "@test"
|
||||
spacing
|
||||
name <- readNormalWord
|
||||
spacing
|
||||
test <- readBraceGroup
|
||||
return $ T_BatsTest id name test
|
||||
|
||||
prop_readWhileClause = isOk readWhileClause "while [[ -e foo ]]; do sleep 1; done"
|
||||
readWhileClause = called "while loop" $ do
|
||||
pos <- getPosition
|
||||
|
@ -2186,6 +2196,7 @@ readCompoundCommand = do
|
|||
readForClause,
|
||||
readSelectClause,
|
||||
readCaseClause,
|
||||
readBatsTest,
|
||||
readFunctionDefinition
|
||||
]
|
||||
spacing
|
||||
|
@ -2534,6 +2545,7 @@ readScript = do
|
|||
"ash",
|
||||
"dash",
|
||||
"bash",
|
||||
"bats",
|
||||
"ksh"
|
||||
]
|
||||
badShells = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue