tests: add "shellcheck" tests for "ksh" scripts
This commit is contained in:
parent
f08727035f
commit
6c0e154e07
|
@ -2,7 +2,7 @@
|
|||
dist: trusty
|
||||
install:
|
||||
- sudo apt-get update
|
||||
- sudo apt-get --no-install-recommends install devscripts python python3 ruby php5-cli gawk ksh zsh pylint
|
||||
- sudo apt-get --no-install-recommends install devscripts python python3 ruby php5-cli gawk ksh zsh pylint shellcheck
|
||||
- sudo apt-get --no-install-recommends install pkg-config libdb-dev libvirt-dev libexpat-dev
|
||||
# - Munin/Plugin.pm is in "munin-node" on precise
|
||||
- sudo apt-get --no-install-recommends install munin-node
|
||||
|
|
20
t/test.t
20
t/test.t
|
@ -85,12 +85,20 @@ sub process_file {
|
|||
};
|
||||
}
|
||||
elsif ( $interpreter =~ m{/bin/ksh} ) {
|
||||
run_check(
|
||||
{ command => [ 'ksh', '-n', $file ],
|
||||
description => 'ksh syntax check',
|
||||
filename => $filename
|
||||
}
|
||||
);
|
||||
subtest $filename => sub {
|
||||
plan tests => 2;
|
||||
run_check(
|
||||
{ command => [ 'ksh', '-n', $file ],
|
||||
description => 'ksh syntax check',
|
||||
filename => $filename
|
||||
}
|
||||
);
|
||||
run_check(
|
||||
{ command => [ 'shellcheck', $file ],
|
||||
description => 'shellcheck'
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
elsif ( $interpreter =~ m{bash} ) {
|
||||
run_check(
|
||||
|
|
Loading…
Reference in New Issue