Fix tests after making the check optional

This commit is contained in:
Adrian Fluturel 2025-01-07 11:47:23 +01:00
parent 37ff09aff5
commit e0fbb83264
1 changed files with 8 additions and 2 deletions

View File

@ -359,7 +359,7 @@ prop_optionIncludes2 =
prop_optionIncludes3 = prop_optionIncludes3 =
-- expect 2086, no inclusions provided, so it is reported -- expect 2086, no inclusions provided, so it is reported
[2086, 2331] == checkOptionIncludes Nothing "#!/bin/sh\n var='a b'\n echo $var" [2086] == checkOptionIncludes Nothing "#!/bin/sh\n var='a b'\n echo $var"
prop_optionIncludes4 = prop_optionIncludes4 =
-- expect 2086 & 2154, only 2154 included, so only that's reported -- expect 2086 & 2154, only 2154 included, so only that's reported
@ -400,6 +400,12 @@ prop_canEnableOptionalsWithRc = result == [2244]
csScript = "#!/bin/sh\n[ \"$1\" ]" csScript = "#!/bin/sh\n[ \"$1\" ]"
} }
prop_canEnableCheckForReadonlyVariables = result == [2331]
where
result = checkWithRc "enable=check-variable-can-be-readonly" emptyCheckSpec {
csScript = "#!/bin/sh\na=3\necho \"$a\""
}
prop_sourcePathRedirectsName = result == [2086] prop_sourcePathRedirectsName = result == [2086]
where where
f "dir/myscript" _ _ "lib" = return "foo/lib" f "dir/myscript" _ _ "lib" = return "foo/lib"
@ -520,7 +526,7 @@ prop_hereDocsAreParsedWithoutTrailingLinefeed = 1044 `elem` result
prop_hereDocsWillHaveParsedIndices = null result prop_hereDocsWillHaveParsedIndices = null result
where where
result = check "#!/bin/bash\nreadonly my_array=(a b)\ncat <<EOF >> ./test\n $(( 1 + my_array[1] ))\nEOF" result = check "#!/bin/bash\nmy_array=(a b)\ncat <<EOF >> ./test\n $(( 1 + my_array[1] ))\nEOF"
prop_rcCanSuppressDfa = null result prop_rcCanSuppressDfa = null result
where where