From: Vsevolod Stakhov Date: Wed, 7 Oct 2015 16:17:02 +0000 (+0100) Subject: Fix scan file functional test. X-Git-Tag: 1.0.5~66^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2f0242ea7ebfbd3724dd3c066711e5ce4119ceca;p=rspamd.git Fix scan file functional test. --- diff --git a/src/libserver/task.c b/src/libserver/task.c index 907260af2..6dd00b8bf 100644 --- a/src/libserver/task.c +++ b/src/libserver/task.c @@ -280,6 +280,8 @@ rspamd_task_load_message (struct rspamd_task *task, } if (tok) { + debug_task ("want to scan file %T", tok); + r = rspamd_strlcpy (filepath, tok->begin, MIN (sizeof (filepath), tok->len + 1)); diff --git a/test/functional/cases/scan_file.sh b/test/functional/cases/scan_file.sh index 1a0606785..107d335e4 100644 --- a/test/functional/cases/scan_file.sh +++ b/test/functional/cases/scan_file.sh @@ -4,9 +4,6 @@ export RSPAMD_CONFIG="$TEST_DIRNAME/configs/trivial.conf" run_rspamd -run perl "$TEST_DIRNAME/cases/scan_file.pl" "$TEST_DIRNAME/messages/gtube.eml" -check_output 'GTUBE' - run perl "$TEST_DIRNAME/cases/scan_file.pl" "file=$TEST_DIRNAME/messages/gtube.eml" check_output 'GTUBE' @@ -18,8 +15,6 @@ check_output 'GTUBE' # Hex encode every character _hex_name=`printf "$TEST_DIRNAME/messages/gtube.eml" | hexdump -v -e '/1 "%02x"' | sed 's/\(..\)/%\1/g'` -run perl "$TEST_DIRNAME/cases/scan_file.pl" "${_hex_name}" -check_output 'GTUBE' run perl "$TEST_DIRNAME/cases/scan_file.pl" "file=${_hex_name}" check_output 'GTUBE'