/* maildir_tests
Author: Giménez, Christian.
Copyright (C) 2016 Giménez, Christian
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
20 nov 2016
*/
:- module(maildir_tests, [
]).
/** maildir_tests: Test unit for maildir library.
For running tests, load the module and use `run_tests.`.
@author Gimenez, Christian
@license GPLv3
*/
:- license(gplv3).
:- begin_tests(maildir).
:- use_module('../prolog/maildir').
test(get_flags) :-
get_flags('hi_world:2,PRS', 'hi_world', [passed, replied, seen]).
test(set_flags) :-
set_flags('hi_world', [seen, passed, replied], 'hi_world:2,PRS').
test(add_flags) :-
add_flags('~/cur/hi_world:2,PR', [passed, seen, draft], '~/cur/hi_world:2,DPRS'),
add_flags('~/new/hi_world', [passed, seen], '~/new/hi_world:2,PS').
test(flags_meaning) :-
maildir:flags_meaning([seen, trashed, draft, flagged, replied, passed],
['S', 'T', 'D', 'F', 'R', 'P']).
:- end_tests(maildir).