Analizo

 view release on metacpan or  search on metacpan

t/features/step_definitions/analizo_steps.pl  view on Meta::CPAN

use File::Temp qw( tempdir );
use File::Copy::Recursive qw( rcopy );
use YAML::XS;
use File::LibMagic;
use Archive::Extract;
use DBI;
use File::Spec;

our $exit_status;
our $stdout;
our $stderr;

use Env qw(@PATH $PWD);
push @PATH, "$PWD/blib/script", "$PWD/bin";

use IPC::Open3;
use Symbol 'gensym';

When qr/^I run "([^\"]*)"$/, sub {
  my ($c) = @_;
  my $command = $1;
  my ($IN, $STDOUT, $STDERR);
  $STDERR = gensym;
  my $pid = open3($IN, $STDOUT, $STDERR, "$command 2>tmp.err");
  waitpid $pid, 0;
  $exit_status = $?;
  local $/ = undef;
  $stdout = <$STDOUT>;
  $stderr = <$STDERR> . read_file('tmp.err');
};

When qr/^I run "([^\"]*)" on database "([^\"]*)"$/, sub {
  my ($c) = @_;
  my $statement = $1;
  my $db = $2;
  my @a = DBI->connect("dbi:SQLite:$db")->selectall_array($statement);
  $stdout = join("\n", map { join("|", @$_) } @a), "\n";
};

t/features/step_definitions/analizo_steps.pl  view on Meta::CPAN

  chdir tempdir("analizo-XXXXXXXXXX", CLEANUP => 1, DIR => File::Spec->tmpdir);
};

Given qr/^I am in (.+)$/, sub {
  my ($c) = @_;
  chdir $1;
};

Then qr/^analizo must emit a warning matching "([^\"]*)"$/, sub {
  my ($c) = @_;
  like($stderr, qr/$1|\Q$1\E/);
};

Then qr/^analizo must not emit a warning matching "([^\"]*)"$/, sub {
  my ($c) = @_;
  unlike($stderr, qr/$1|\Q$1\E/);
};

Then qr/^analizo must report that "([^\"]*)" is part of "([^\"]*)"$/, sub {
  my ($c) = @_;
  my ($func, $mod) = ($1, $2);
  like($stdout, qr/subgraph "cluster_$mod" \{[^}]*node[^}]*"\Q$func\E";/);
};

Then qr/^analizo must report that "([^\"]*)" depends on "([^\"]*)"$/, sub {
  my ($c) = @_;

t/samples/httpd-2.4.38/http_config.h  view on Meta::CPAN

 */
AP_DECLARE_HOOK(int,check_config,(apr_pool_t *pconf, apr_pool_t *plog,
                                  apr_pool_t *ptemp, server_rec *s))

/**
 * Run the test_config function for each module; this hook is run
 * only if the server was invoked to test the configuration syntax.
 * @param pconf The config pool
 * @param s The list of server_recs
 * @note To avoid reordering problems due to different buffering, hook
 *       functions should only apr_file_*() to print to stdout/stderr and
 *       not simple printf()/fprintf().
 *     
 */
AP_DECLARE_HOOK(void,test_config,(apr_pool_t *pconf, server_rec *s))

/**
 * Run the post_config function for each module
 * @param pconf The config pool
 * @param plog The logging streams pool
 * @param ptemp The temporary pool

t/samples/kdelibs/parser.cpp  view on Meta::CPAN


  /* The number of symbols on the RHS of the reduced rule.
     Keep to zero when no symbol should be popped.  */
  int yylen = 0;

  yytoken = 0;
  yyss = yyssa;
  yyvs = yyvsa;
  yystacksize = YYINITDEPTH;

  YYDPRINTF ((stderr, "Starting parse\n"));

  yystate = 0;
  yyerrstatus = 0;
  yynerrs = 0;
  yychar = YYEMPTY; /* Cause a token to be read.  */

  /* Initialize stack pointers.
     Waste one element of value and location stack
     so that they stay on the same level as the state stack.
     The wasted elements are never initialized.  */

t/samples/sample_basic/c/config.sh  view on Meta::CPAN

tests_dir="$(dirname $0)/tests"
mkdir -p ${tests_dir}

expected_cmdline="${tests_dir}/${test_name}.cmdline"
expected_stdout="${tests_dir}/${test_name}.out"
expected_stderr="${tests_dir}/${test_name}.err"
expected_status="${tests_dir}/${test_name}.status"



( run in 0.922 second using v1.01-cache-2.11-cpan-49f99fa48dc )