mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
fhem.pl: better syntax checking for -t (Forum #111061)
git-svn-id: https://svn.fhem.de/fhem/trunk@21940 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
f546691500
commit
bd63d559b0
@ -6086,7 +6086,10 @@ prepareFhemTestFile()
|
||||
return if($ARGV[0] ne "-t" || @ARGV < 2);
|
||||
shift @ARGV;
|
||||
|
||||
return if($ARGV[0] !~ m,^(.*?)([^/]+)\.t$,);
|
||||
if($ARGV[0] !~ m,^(.*?)([^/]+)\.t$, || !-r $ARGV[0]) {
|
||||
print STDERR "Need a .t file as argument for -t\n";
|
||||
exit(1);
|
||||
}
|
||||
my ($dir, $fileBase) = ($1, $2);
|
||||
|
||||
$fhemTestFile = $ARGV[0];
|
||||
|
Loading…
x
Reference in New Issue
Block a user