]>
git.proxmox.com Git - proxmox-spamassassin.git/blob - upstream/t/hashcash.t
3 use lib
'.'; use lib
't';
4 use SATest
; sa_t_init
("hashcash");
6 # we need DB_File to support the double-spend db.
7 use constant HAS_DB_FILE
=> eval { require DB_File
};
10 plan skip_all
=> "This test requires DB_File" unless HAS_DB_FILE
;
13 # ---------------------------------------------------------------------------
16 q{ HASHCASH_24 }, 'hashcash24',
20 hashcash_accept test@example.com test1@example.com test2@example.com
21 hashcash_doublespend_path log/user_state/hashcash_seen
24 sarun
("-L -t < data/nice/001", \
&patterns_run_cb
);
28 q{ HASHCASH_20 }, 'hashcash20',
31 sarun
("-L -t < data/nice/001", \
&patterns_run_cb
);
35 q{ HASHCASH_2SPEND }, '2spend',
38 sarun
("-L -t < data/nice/001", \
&patterns_run_cb
);
41 # try again with a mail with 2 tokens, one unspent.
44 q{ HASHCASH_2SPEND }, '2spend',
46 sarun
("-L -t < data/nice/016", \
&patterns_run_cb
);