The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Gruntmaster::Daemon::Runner::File - Compare output with static text files

SYNOPSIS

  use Gruntmaster::Daemon::Runner::File;
  Gruntmaster::Daemon::Runner::File::run(5, $meta);

DESCRIPTION

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.

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.

If the two strings match, the verdict is $meta->{tests}[$test - 1]. Otherwise, the verdict is [WA, "Wrong answer"].

AUTHOR

Marius Gavrilescu <marius@ieval.ro>

COPYRIGHT AND LICENSE

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.