From 2f0242ea7ebfbd3724dd3c066711e5ce4119ceca Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 7 Oct 2015 17:17:02 +0100 Subject: [PATCH] Fix scan file functional test. --- src/libserver/task.c | 2 ++ test/functional/cases/scan_file.sh | 5 ----- 2 files changed, 2 insertions(+), 5 deletions(-) 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' -- 2.39.5