Files
bashate/bash8/tests/samples/legacy_sample.sh
Mathew Odden 2e40f65b2e Add tests and samples for legacy bash8
This change introduces some basic tests for bash8
checks, including a sample file that is used to verify
checked errors before/in the 0.1.0 release.

Change-Id: Icc8f9889e5539949a6475769d1083cd619c2c79e
2014-05-27 17:13:44 -05:00

40 lines
382 B
Bash

#!/bin/bash
# E020
function somefunction () {
echo "E002: Has a tab"
echo "E003: Not an indent with multiple of 4"
}
# E001
somefunction args
# E010
for thing in things
do
run_things thing
done
while 0
do
run_thing
done
until 1
do
run_thing
done
# E011
if [ 0 ]
then
run_morethings
else
run_otherthings
fi
# E012
cat <<EOH
this heredoc is bad
# E004