#!/usr/bin/perl

use strict;
use Test::More tests => 2;
use SysWrap;

mkdir("/home/runner/work/rsnapshot/rsnapshot//t//support/files/a") unless -d "/home/runner/work/rsnapshot/rsnapshot//t//support/files/a";
execute("cp /home/runner/work/rsnapshot/rsnapshot//t/support/files/template/a/1 /home/runner/work/rsnapshot/rsnapshot//t/support/files/template/a/2 /home/runner/work/rsnapshot/rsnapshot//t//support/files/a/");

ok(0 != rsnapshot("-c /home/runner/work/rsnapshot/rsnapshot//t//rsync-exitcode/conf/rsync-exitcode-bad.conf hourly"));
ok(0 == rsnapshot("-c /home/runner/work/rsnapshot/rsnapshot//t//rsync-exitcode/conf/rsync-exitcode-good.conf hourly"));

execute("rm -f /home/runner/work/rsnapshot/rsnapshot//t//support/files/a/1 /home/runner/work/rsnapshot/rsnapshot//t/support/files/a/2");
