mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-08 04:18:25 +08:00
Added some test cases, not all of which are supported yet
This commit is contained in:
1
badcase/alphaltnum
Normal file
1
badcase/alphaltnum
Normal file
@@ -0,0 +1 @@
|
||||
if [[ $V < 3 ]]; then echo foo; fi
|
1
badcase/dollarassign
Normal file
1
badcase/dollarassign
Normal file
@@ -0,0 +1 @@
|
||||
$FOO=3
|
1
badcase/forinls
Normal file
1
badcase/forinls
Normal file
@@ -0,0 +1 @@
|
||||
for f in `ls *.jpg`; do echo "$f"; done
|
1
badcase/intosame
Normal file
1
badcase/intosame
Normal file
@@ -0,0 +1 @@
|
||||
cat compile.sh |tr -d '\r' > compile.sh
|
1
badcase/missingspacetest
Normal file
1
badcase/missingspacetest
Normal file
@@ -0,0 +1 @@
|
||||
if [[foo ]]; then echo lol; fi
|
1
badcase/semicolonthen
Normal file
1
badcase/semicolonthen
Normal file
@@ -0,0 +1 @@
|
||||
if [[ foo ]]; then; echo lol; fi
|
1
badcase/spaceassign1
Normal file
1
badcase/spaceassign1
Normal file
@@ -0,0 +1 @@
|
||||
LOL = 3
|
1
badcase/spaceassign2
Normal file
1
badcase/spaceassign2
Normal file
@@ -0,0 +1 @@
|
||||
LOL= 3
|
1
badcase/spaceassign3
Normal file
1
badcase/spaceassign3
Normal file
@@ -0,0 +1 @@
|
||||
LOL =3
|
2
badcase/subshellvar
Normal file
2
badcase/subshellvar
Normal file
@@ -0,0 +1,2 @@
|
||||
echo cow | while read foo; do DIR=$foo; done
|
||||
echo $DIR
|
2
badcase/unexpanded
Normal file
2
badcase/unexpanded
Normal file
@@ -0,0 +1,2 @@
|
||||
foo=bar
|
||||
echo $file | sed -e 's/$foo/baz/g'
|
1
badcase/unquotedtest
Normal file
1
badcase/unquotedtest
Normal file
@@ -0,0 +1 @@
|
||||
if [ -f $foo ]; then echo cow; fi
|
Reference in New Issue
Block a user