lsyncd/tests/wrong-rsync.sh
Junichi Uekawa e1e6940146 Revise test to handle different exit code.
test for exit code 3 instead of 255.
2008-11-02 12:26:45 +00:00

17 lines
396 B
Bash
Executable File

#!/bin/bash
# copyright 2008 Junichi Uekawa <dancer@debian.org>
# licensed under GPLv2 or later, see the file ../COPYING for details.
# make sure that program exits with exit code of -1 when rsync path is
# wrong.
WORKTARGET=$(mktemp -d)
./lsyncd --no-daemon --rsync-binary /wrong/path/to/rsync . "${WORKTARGET}"
if [[ $? = 3 ]]; then
rmdir "${WORKTARGET}"
exit 0;
else
exit 1;
fi