Gruntmaster::Daemon::Runner::File - Compare output with static text files
use Gruntmaster::Daemon::Runner::File; Gruntmaster::Daemon::Runner::File::run(5, $meta);
Gruntmaster::Daemon::Runner::File is a runner which compares the program output for test $test with a static output. Before comparing, leading and trailing whitespace is removed, and sequences of whitespace are converted to a single space.
$test
If $meta->{okfile} exists, the output is compared to $meta->{okfile}[$test - 1]. Otherwise, the output is compared to /var/lib/gruntmasterd/pb/$meta->{problem}/$test.ok.
$meta->{okfile}
$meta->{okfile}[$test - 1]
If the two strings match, the verdict is $meta->{tests}[$test - 1]. Otherwise, the verdict is [WA, "Wrong answer"].
$meta->{tests}[$test - 1]
[WA, "Wrong answer"]
Marius Gavrilescu <marius@ieval.ro>
Copyright (C) 2014 by Marius Gavrilescu
This library is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
To install Gruntmaster::Daemon, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Gruntmaster::Daemon
CPAN shell
perl -MCPAN -e shell install Gruntmaster::Daemon
For more information on module installation, please visit the detailed CPAN module installation guide.