# compile_all.t
# ----------------------------------------------------------------------
# Compiles all .pl and .pm files under the current directory.  In a
# checkout area this includes the core plus all installed or
# pseudo-installed plugins which might require quite a lot of CPAN
# modules.
#
# Explicitly excluded is bin/twiki_cgi, which dies because it is not
# supposed to be called from the command line and checks this in the
# BEGIN block.
#
# Requires:
#    * Test::Compile
#    * Whatever is needed by TWiki core and the plugins
#    * Whatever is needed by the modules shipped in lib/CPAN/lib (ugh!)
# ----------------------------------------------------------------------
# Copyright 2017 Harald.Joerg@arcor.de
# License: GPL V3
# ----------------------------------------------------------------------

use strict;
use warnings;

use lib 'bin';          # scripts need bin/setlib
use lib 'lib/CPAN/lib'; # TWiki ships with some stuff

use Test::Compile;
my $test = Test::Compile->new();

# the following kludge allows bin/twiki_cgi to pass, which dies when
# running "from the command line" in a BEGIN block - which is executed
# during syntax check
$ENV{GATEWAY_INTERFACE} //= 'whatever';

$test->all_files_ok();
$test->done_testing();

