lsyncd/tests/wrong-logfile.sh

17 lines
456 B
Bash
Raw Normal View History

2008-10-06 20:35:52 +00:00
#!/bin/bash
# copyright 2008 Junichi Uekawa <dancer@debian.org>
# licensed under GPLv2 or later, see the file ../COPYING for details.
# make sure wrong logfile specification gives a reasonable error
# message
WORKTARGET=$(mktemp -d)
2008-12-05 22:26:03 +00:00
if [[ $( ./lsyncd --logfile /nonexisting/path/name . "${WORKTARGET}" 2>&1 ) =~ "cannot open logfile [/nonexisting/path/name]!" ]]; then
2008-10-06 20:35:52 +00:00
rmdir "${WORKTARGET}"
exit 0;
else
2008-12-05 22:26:03 +00:00
rmdir "${WORKTARGET}"
2008-10-06 20:35:52 +00:00
exit 1;
fi
2008-12-05 22:26:03 +00:00