summaryrefslogtreecommitdiffstats
path: root/debian/opensync/opensync-0.22/tests
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2020-09-11 14:38:47 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2020-09-11 14:38:47 +0900
commit884c8093d63402a1ad0b502244b791e3c6782be3 (patch)
treea600d4ab0d431a2bdfe4c15b70df43c14fbd8dd0 /debian/opensync/opensync-0.22/tests
parent14e1aa2006796f147f3f4811fb908a6b01e79253 (diff)
downloadextra-dependencies-884c8093d63402a1ad0b502244b791e3c6782be3.tar.gz
extra-dependencies-884c8093d63402a1ad0b502244b791e3c6782be3.zip
Added debian extra dependency packages.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'debian/opensync/opensync-0.22/tests')
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/Makefile.am111
-rw-r--r--debian/opensync/opensync-0.22/tests/Makefile.in862
-rw-r--r--debian/opensync/opensync-0.22/tests/check_codes.c1143
-rw-r--r--debian/opensync/opensync-0.22/tests/check_conv.c1024
-rw-r--r--debian/opensync/opensync-0.22/tests/check_env.c219
-rw-r--r--debian/opensync/opensync-0.22/tests/check_error.c201
-rw-r--r--debian/opensync/opensync-0.22/tests/check_filter.c343
-rw-r--r--debian/opensync/opensync-0.22/tests/check_group.c62
-rw-r--r--debian/opensync/opensync-0.22/tests/check_ipc.c2093
-rw-r--r--debian/opensync/opensync-0.22/tests/check_lock.c275
-rw-r--r--debian/opensync/opensync-0.22/tests/check_member.c42
-rw-r--r--debian/opensync/opensync-0.22/tests/check_multisync.c1829
-rw-r--r--debian/opensync/opensync-0.22/tests/check_plugins.c80
-rw-r--r--debian/opensync/opensync-0.22/tests/check_sync.c685
-rw-r--r--debian/opensync/opensync-0.22/tests/check_user.c48
-rw-r--r--debian/opensync/opensync-0.22/tests/check_vcal.c479
-rw-r--r--debian/opensync/opensync-0.22/tests/check_vcard.c456
-rw-r--r--debian/opensync/opensync-0.22/tests/check_vnote.c284
-rw-r--r--debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/1/anchor.dbbin0 -> 3072 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/1/file-sync.conf1
-rw-r--r--debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/1/hash.dbbin0 -> 3072 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/1/syncmember.conf2
-rw-r--r--debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/2/file-sync.conf1
-rw-r--r--debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/2/hash.dbbin0 -> 3072 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/2/syncmember.conf2
-rw-r--r--debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/change.dbbin0 -> 2048 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/syncgroup.conf2
-rw-r--r--debian/opensync/opensync-0.22/tests/data/destobjtype_delete/data1/file1
-rw-r--r--debian/opensync/opensync-0.22/tests/data/destobjtype_delete/data1/file21
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_sync_custom/data1/testdatabin0 -> 3072 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/filter_sync_custom/data2/testdata2bin0 -> 2048 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/data1/testdatabin0 -> 3072 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/data2/testdata2bin0 -> 2048 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/data1/testdatabin0 -> 3072 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/data1/testdata2bin0 -> 2048 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/data1/vcard.vcf11
-rw-r--r--debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/data2/testdata3bin0 -> 1024 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/3/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/3/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/data1/testdatabin0 -> 3072 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/newdatabin0 -> 512 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/newdata2bin0 -> 512 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/3/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/3/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/data1/testdatabin0 -> 3072 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/data2/testdatabin0 -> 512 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/3/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/3/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/data1/testdatabin0 -> 3072 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/data2/testdatabin0 -> 512 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/data3/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/3/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/3/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/data1/testdatabin0 -> 3072 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/data2/testdatabin0 -> 512 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/data3/testdatabin0 -> 512 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/3/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/3/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new/data1/testdatabin0 -> 3072 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdatabin0 -> 512 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata1bin0 -> 512 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata2bin0 -> 512 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata3bin0 -> 512 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata4bin0 -> 1024 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata5bin0 -> 512 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/3/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/3/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/data1/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/data2/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/3/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/3/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/data1/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/data2/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/data3/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/plugin_no_config/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/plugin_no_config/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/plugin_no_config/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/plugin_no_config/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/data1/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/data1/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/data2/testdatabin0 -> 3072 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/data2/testdata-dupebin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/comp_data/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/data1/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/new_databin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_conflict/comp_data/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_conflict/data1/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_conflict/data2/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/comp_data/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/comp_data/testdata-dupebin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/data1/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/data2/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/data1/testdatabin0 -> 3072 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/data1/testdata2bin0 -> 2048 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new/data1/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new_del/data1/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/data1/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/data2/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_init_error/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_init_error/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_init_error/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_moddel/data1/testdatabin0 -> 3072 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/sync_moddel/new_data1bin0 -> 1024 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/sync_moddel/new_data2bin0 -> 2048 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/syncgroup.conf2
-rw-r--r--debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/data1/subdir/testdata1bin0 -> 512 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_subdirs_new/data1/testdatabin0 -> 3072 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/data2/subdir/testdatabin0 -> 512 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/1-conflict.vcf22
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/1-different.vcf20
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/1-same.vcf22
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/2-conflict.vcf25
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/2-different.vcf23
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/2-same.vcf21
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-full1.vcf47
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-full2.vcf47
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-multiline.vcf53
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-photo.vcf59
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-special.vcf26
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-umlaute.vcf54
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/1-conflict.vcf9
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/1-different.vcf7
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/1-same.vcf10
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/2-conflict.vcf12
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/2-different.vcf10
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/2-same.vcf10
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-full1-2.1.vcf75
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-full1-3.0.vcf75
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-full2-2.1.vcf76
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-full2-3.0.vcf75
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-multiline-2.1.vcf78
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-multiline-3.0.vcf76
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-photo1-2.1.vcf114
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-photo1-3.0.vcf113
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-photo2-2.1.vcf78
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-photo2-3.0.vcf77
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-sound1-2.1.vcf76
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-sound1-3.0.vcf75
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-sound2-2.1.vcf77
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-sound2-3.0.vcf76
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-special-2.1.vcf79
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-special-3.0.vcf77
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-umlaute-2.1.vcf78
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-umlaute-3.0.vcf76
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/malformed.vcf3
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vevents/crash.ics27
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vevents/evolution2/1-hour-alarm.vcf43
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vevents/evolution2/1-hour-alarm2.vcf64
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vevents/evolution2/1-hour.vcf37
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vevents/evolution2/all-day.vcf16
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vevents/evolution2/all-day2.vcf23
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vevents/evolution2/evo2-recur-until.vcf48
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vevents/evolution2/free-busy.vcf55
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vevents/evolution2/full-special.vcf41
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-every-year.vcf38
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-except.vcf39
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-for.vcf38
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-forever.vcf38
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-until.vcf44
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vevents/kdepim/1-hour-1.0.vcs19
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vevents/kdepim/1-hour-2.0.ics20
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vevents/qp_wrap10
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vevents/utf8_wrap10
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vnotes/vnote-minimal.vnt5
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vnotes/vnote1-same.vnt10
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vnotes/vnote1-similar.vnt10
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vnotes/vnote1.vnt10
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vnotes/vnote2.vnt10
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vnotes/vnote3.vnt8
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full1.vcf51
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full2.vcf22
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full3.vcf23
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full4.vcf21
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full5.vcf42
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full6.vcf59
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full7.vcf20
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-simple.vcf16
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vtodos/kdepim/todo-full1.vcs21
-rw-r--r--debian/opensync/opensync-0.22/tests/mock-plugin/Makefile.am22
-rw-r--r--debian/opensync/opensync-0.22/tests/mock-plugin/Makefile.in554
-rw-r--r--debian/opensync/opensync-0.22/tests/mock-plugin/mock_format.c137
-rw-r--r--debian/opensync/opensync-0.22/tests/mock-plugin/mock_sync.c559
-rw-r--r--debian/opensync/opensync-0.22/tests/mock-plugin/mock_sync.h18
-rw-r--r--debian/opensync/opensync-0.22/tests/support.c529
-rw-r--r--debian/opensync/opensync-0.22/tests/support.h78
319 files changed, 15272 insertions, 0 deletions
diff --git a/debian/opensync/opensync-0.22/tests/Makefile.am b/debian/opensync/opensync-0.22/tests/Makefile.am
new file mode 100755
index 00000000..29b03f6f
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/Makefile.am
@@ -0,0 +1,111 @@
+## Process this file with automake to produce Makefile.in
+
+SUBDIRS = mock-plugin
+
+AM_CFLAGS = @XML_CFLAGS@ -Wall -Werror @GCOV_CFLAGS@ -DOPENSYNC_TESTDATA=\"$(srcdir)/\"
+
+INCLUDES = -I$(top_srcdir) @PACKAGE_CFLAGS@ -I$(top_srcdir)/osengine
+
+EXTRA_DIST = \
+ data \
+ support.h
+
+if ENABLE_PROF
+PROFTEST = coverage.sh
+endif
+
+if ENABLE_TESTS
+TESTS = error ipc user member group plugin locks env conv sync filter multisync vcard vcal vnote errorcodes $(PROFTEST)
+noinst_PROGRAMS = error ipc user member group plugin locks env conv sync filter multisync vcard vcal vnote errorcodes
+else
+TESTS =
+noinst_PROGRAMS =
+endif
+
+error_INCLUDES = @CHECK_CFLAGS@
+error_SOURCES = check_error.c
+error_LIBS = @CHECK_LIBS@
+error_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+
+ipc_INCLUDES = @CHECK_CFLAGS@
+ipc_SOURCES = check_ipc.c support.c
+ipc_LIBS = @CHECK_LIBS@
+ipc_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+
+member_INCLUDES = @CHECK_CFLAGS@
+member_SOURCES = check_member.c
+member_LIBS = @CHECK_LIBS@
+member_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+
+group_INCLUDES = @CHECK_CFLAGS@
+group_SOURCES = check_group.c support.c
+group_LIBS = @CHECK_LIBS@
+group_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+
+plugin_INCLUDES = @CHECK_CFLAGS@
+plugin_SOURCES = check_plugins.c support.c
+plugin_LIBS = @CHECK_LIBS@
+plugin_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+
+locks_INCLUDES = @CHECK_CFLAGS@
+locks_SOURCES = check_lock.c support.c
+locks_LIBS = @CHECK_LIBS@
+locks_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+
+env_INCLUDES = @CHECK_CFLAGS@
+env_SOURCES = check_env.c support.c
+env_LIBS = @CHECK_LIBS@
+env_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+
+user_INCLUDES = @CHECK_CFLAGS@
+user_SOURCES = check_user.c
+user_LIBS = @CHECK_LIBS@
+user_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+
+conv_INCLUDES = @CHECK_CFLAGS@
+conv_SOURCES = check_conv.c support.c
+conv_LIBS = @CHECK_LIBS@
+conv_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+
+sync_INCLUDES = @CHECK_CFLAGS@
+sync_SOURCES = check_sync.c support.c
+sync_LIBS = @CHECK_LIBS@
+sync_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+
+filter_INCLUDES = @CHECK_CFLAGS@
+filter_SOURCES = check_filter.c support.c
+filter_LIBS = @CHECK_LIBS@
+filter_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+
+multisync_INCLUDES = @CHECK_CFLAGS@
+multisync_SOURCES = check_multisync.c support.c
+multisync_LIBS = @CHECK_LIBS@
+multisync_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+
+vcard_INCLUDES = @CHECK_CFLAGS@
+vcard_SOURCES = check_vcard.c support.c
+vcard_LIBS = @CHECK_LIBS@
+vcard_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+
+vcal_INCLUDES = @CHECK_CFLAGS@
+vcal_SOURCES = check_vcal.c support.c
+vcal_LIBS = @CHECK_LIBS@
+vcal_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+
+vnote_INCLUDES = @CHECK_CFLAGS@
+vnote_SOURCES = check_vnote.c support.c
+vnote_LIBS = @CHECK_LIBS@
+vnote_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+
+errorcodes_INCLUDES = @CHECK_CFLAGS@
+errorcodes_SOURCES = check_codes.c support.c
+errorcodes_LIBS = @CHECK_LIBS@
+errorcodes_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+
+CLEANFILES = \
+ *.bb \
+ *.bbg \
+ *.da
+
+clean:
+ rm -rf coverage/*
diff --git a/debian/opensync/opensync-0.22/tests/Makefile.in b/debian/opensync/opensync-0.22/tests/Makefile.in
new file mode 100644
index 00000000..8a239d87
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/Makefile.in
@@ -0,0 +1,862 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@ENABLE_TESTS_TRUE@noinst_PROGRAMS = error$(EXEEXT) ipc$(EXEEXT) \
+@ENABLE_TESTS_TRUE@ user$(EXEEXT) member$(EXEEXT) \
+@ENABLE_TESTS_TRUE@ group$(EXEEXT) plugin$(EXEEXT) \
+@ENABLE_TESTS_TRUE@ locks$(EXEEXT) env$(EXEEXT) conv$(EXEEXT) \
+@ENABLE_TESTS_TRUE@ sync$(EXEEXT) filter$(EXEEXT) \
+@ENABLE_TESTS_TRUE@ multisync$(EXEEXT) vcard$(EXEEXT) \
+@ENABLE_TESTS_TRUE@ vcal$(EXEEXT) vnote$(EXEEXT) \
+@ENABLE_TESTS_TRUE@ errorcodes$(EXEEXT)
+subdir = tests
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+PROGRAMS = $(noinst_PROGRAMS)
+am_conv_OBJECTS = check_conv.$(OBJEXT) support.$(OBJEXT)
+conv_OBJECTS = $(am_conv_OBJECTS)
+conv_LDADD = $(LDADD)
+am_env_OBJECTS = check_env.$(OBJEXT) support.$(OBJEXT)
+env_OBJECTS = $(am_env_OBJECTS)
+env_LDADD = $(LDADD)
+am_error_OBJECTS = check_error.$(OBJEXT)
+error_OBJECTS = $(am_error_OBJECTS)
+error_LDADD = $(LDADD)
+am_errorcodes_OBJECTS = check_codes.$(OBJEXT) support.$(OBJEXT)
+errorcodes_OBJECTS = $(am_errorcodes_OBJECTS)
+errorcodes_LDADD = $(LDADD)
+am_filter_OBJECTS = check_filter.$(OBJEXT) support.$(OBJEXT)
+filter_OBJECTS = $(am_filter_OBJECTS)
+filter_LDADD = $(LDADD)
+am_group_OBJECTS = check_group.$(OBJEXT) support.$(OBJEXT)
+group_OBJECTS = $(am_group_OBJECTS)
+group_LDADD = $(LDADD)
+am_ipc_OBJECTS = check_ipc.$(OBJEXT) support.$(OBJEXT)
+ipc_OBJECTS = $(am_ipc_OBJECTS)
+ipc_LDADD = $(LDADD)
+am_locks_OBJECTS = check_lock.$(OBJEXT) support.$(OBJEXT)
+locks_OBJECTS = $(am_locks_OBJECTS)
+locks_LDADD = $(LDADD)
+am_member_OBJECTS = check_member.$(OBJEXT)
+member_OBJECTS = $(am_member_OBJECTS)
+member_LDADD = $(LDADD)
+am_multisync_OBJECTS = check_multisync.$(OBJEXT) support.$(OBJEXT)
+multisync_OBJECTS = $(am_multisync_OBJECTS)
+multisync_LDADD = $(LDADD)
+am_plugin_OBJECTS = check_plugins.$(OBJEXT) support.$(OBJEXT)
+plugin_OBJECTS = $(am_plugin_OBJECTS)
+plugin_LDADD = $(LDADD)
+am_sync_OBJECTS = check_sync.$(OBJEXT) support.$(OBJEXT)
+sync_OBJECTS = $(am_sync_OBJECTS)
+sync_LDADD = $(LDADD)
+am_user_OBJECTS = check_user.$(OBJEXT)
+user_OBJECTS = $(am_user_OBJECTS)
+user_LDADD = $(LDADD)
+am_vcal_OBJECTS = check_vcal.$(OBJEXT) support.$(OBJEXT)
+vcal_OBJECTS = $(am_vcal_OBJECTS)
+vcal_LDADD = $(LDADD)
+am_vcard_OBJECTS = check_vcard.$(OBJEXT) support.$(OBJEXT)
+vcard_OBJECTS = $(am_vcard_OBJECTS)
+vcard_LDADD = $(LDADD)
+am_vnote_OBJECTS = check_vnote.$(OBJEXT) support.$(OBJEXT)
+vnote_OBJECTS = $(am_vnote_OBJECTS)
+vnote_LDADD = $(LDADD)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(conv_SOURCES) $(env_SOURCES) $(error_SOURCES) \
+ $(errorcodes_SOURCES) $(filter_SOURCES) $(group_SOURCES) \
+ $(ipc_SOURCES) $(locks_SOURCES) $(member_SOURCES) \
+ $(multisync_SOURCES) $(plugin_SOURCES) $(sync_SOURCES) \
+ $(user_SOURCES) $(vcal_SOURCES) $(vcard_SOURCES) \
+ $(vnote_SOURCES)
+DIST_SOURCES = $(conv_SOURCES) $(env_SOURCES) $(error_SOURCES) \
+ $(errorcodes_SOURCES) $(filter_SOURCES) $(group_SOURCES) \
+ $(ipc_SOURCES) $(locks_SOURCES) $(member_SOURCES) \
+ $(multisync_SOURCES) $(plugin_SOURCES) $(sync_SOURCES) \
+ $(user_SOURCES) $(vcal_SOURCES) $(vcard_SOURCES) \
+ $(vnote_SOURCES)
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-exec-recursive install-info-recursive \
+ install-recursive installcheck-recursive installdirs-recursive \
+ pdf-recursive ps-recursive uninstall-info-recursive \
+ uninstall-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BUILD_ENGINE = @BUILD_ENGINE@
+BUILD_ENGINE_FALSE = @BUILD_ENGINE_FALSE@
+BUILD_ENGINE_TRUE = @BUILD_ENGINE_TRUE@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHECK_CFLAGS = @CHECK_CFLAGS@
+CHECK_LIBS = @CHECK_LIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_DEBUG = @ENABLE_DEBUG@
+ENABLE_PROF_FALSE = @ENABLE_PROF_FALSE@
+ENABLE_PROF_TRUE = @ENABLE_PROF_TRUE@
+ENABLE_TESTS_FALSE = @ENABLE_TESTS_FALSE@
+ENABLE_TESTS_TRUE = @ENABLE_TESTS_TRUE@
+ENABLE_TOOLS_FALSE = @ENABLE_TOOLS_FALSE@
+ENABLE_TOOLS_TRUE = @ENABLE_TOOLS_TRUE@
+ENABLE_TRACE = @ENABLE_TRACE@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GCOV_CFLAGS = @GCOV_CFLAGS@
+GCOV_LDFLAGS = @GCOV_LDFLAGS@
+GREP = @GREP@
+HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@
+HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+OPENSYNC_CONFIGDIR = @OPENSYNC_CONFIGDIR@
+OPENSYNC_ENGINEHEADERDIR = @OPENSYNC_ENGINEHEADERDIR@
+OPENSYNC_FORMATSDIR = @OPENSYNC_FORMATSDIR@
+OPENSYNC_HEADERDIR = @OPENSYNC_HEADERDIR@
+OPENSYNC_PLUGINDIR = @OPENSYNC_PLUGINDIR@
+OSPLUGIN = @OSPLUGIN@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_CFLAGS = @PACKAGE_CFLAGS@
+PACKAGE_LIBS = @PACKAGE_LIBS@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PYTHON = @PYTHON@
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SWIG = @SWIG@
+SWIG_LIB = @SWIG_LIB@
+SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@
+SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@
+VERSION = @VERSION@
+XML_CFLAGS = @XML_CFLAGS@
+XML_LIBS = @XML_LIBS@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_workaround_abs_builddir = @ac_workaround_abs_builddir@
+ac_workaround_abs_srcdir = @ac_workaround_abs_srcdir@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+SUBDIRS = mock-plugin
+AM_CFLAGS = @XML_CFLAGS@ -Wall -Werror @GCOV_CFLAGS@ -DOPENSYNC_TESTDATA=\"$(srcdir)/\"
+INCLUDES = -I$(top_srcdir) @PACKAGE_CFLAGS@ -I$(top_srcdir)/osengine
+EXTRA_DIST = \
+ data \
+ support.h
+
+@ENABLE_PROF_TRUE@PROFTEST = coverage.sh
+@ENABLE_TESTS_FALSE@TESTS =
+@ENABLE_TESTS_TRUE@TESTS = error ipc user member group plugin locks env conv sync filter multisync vcard vcal vnote errorcodes $(PROFTEST)
+error_INCLUDES = @CHECK_CFLAGS@
+error_SOURCES = check_error.c
+error_LIBS = @CHECK_LIBS@
+error_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+ipc_INCLUDES = @CHECK_CFLAGS@
+ipc_SOURCES = check_ipc.c support.c
+ipc_LIBS = @CHECK_LIBS@
+ipc_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+member_INCLUDES = @CHECK_CFLAGS@
+member_SOURCES = check_member.c
+member_LIBS = @CHECK_LIBS@
+member_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+group_INCLUDES = @CHECK_CFLAGS@
+group_SOURCES = check_group.c support.c
+group_LIBS = @CHECK_LIBS@
+group_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+plugin_INCLUDES = @CHECK_CFLAGS@
+plugin_SOURCES = check_plugins.c support.c
+plugin_LIBS = @CHECK_LIBS@
+plugin_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+locks_INCLUDES = @CHECK_CFLAGS@
+locks_SOURCES = check_lock.c support.c
+locks_LIBS = @CHECK_LIBS@
+locks_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+env_INCLUDES = @CHECK_CFLAGS@
+env_SOURCES = check_env.c support.c
+env_LIBS = @CHECK_LIBS@
+env_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+user_INCLUDES = @CHECK_CFLAGS@
+user_SOURCES = check_user.c
+user_LIBS = @CHECK_LIBS@
+user_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+conv_INCLUDES = @CHECK_CFLAGS@
+conv_SOURCES = check_conv.c support.c
+conv_LIBS = @CHECK_LIBS@
+conv_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+sync_INCLUDES = @CHECK_CFLAGS@
+sync_SOURCES = check_sync.c support.c
+sync_LIBS = @CHECK_LIBS@
+sync_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+filter_INCLUDES = @CHECK_CFLAGS@
+filter_SOURCES = check_filter.c support.c
+filter_LIBS = @CHECK_LIBS@
+filter_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+multisync_INCLUDES = @CHECK_CFLAGS@
+multisync_SOURCES = check_multisync.c support.c
+multisync_LIBS = @CHECK_LIBS@
+multisync_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+vcard_INCLUDES = @CHECK_CFLAGS@
+vcard_SOURCES = check_vcard.c support.c
+vcard_LIBS = @CHECK_LIBS@
+vcard_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+vcal_INCLUDES = @CHECK_CFLAGS@
+vcal_SOURCES = check_vcal.c support.c
+vcal_LIBS = @CHECK_LIBS@
+vcal_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+vnote_INCLUDES = @CHECK_CFLAGS@
+vnote_SOURCES = check_vnote.c support.c
+vnote_LIBS = @CHECK_LIBS@
+vnote_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+errorcodes_INCLUDES = @CHECK_CFLAGS@
+errorcodes_SOURCES = check_codes.c support.c
+errorcodes_LIBS = @CHECK_LIBS@
+errorcodes_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+CLEANFILES = \
+ *.bb \
+ *.bbg \
+ *.da
+
+all: all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign tests/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; for p in $$list; do \
+ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f $$p $$f"; \
+ rm -f $$p $$f ; \
+ done
+conv$(EXEEXT): $(conv_OBJECTS) $(conv_DEPENDENCIES)
+ @rm -f conv$(EXEEXT)
+ $(LINK) $(conv_LDFLAGS) $(conv_OBJECTS) $(conv_LDADD) $(LIBS)
+env$(EXEEXT): $(env_OBJECTS) $(env_DEPENDENCIES)
+ @rm -f env$(EXEEXT)
+ $(LINK) $(env_LDFLAGS) $(env_OBJECTS) $(env_LDADD) $(LIBS)
+error$(EXEEXT): $(error_OBJECTS) $(error_DEPENDENCIES)
+ @rm -f error$(EXEEXT)
+ $(LINK) $(error_LDFLAGS) $(error_OBJECTS) $(error_LDADD) $(LIBS)
+errorcodes$(EXEEXT): $(errorcodes_OBJECTS) $(errorcodes_DEPENDENCIES)
+ @rm -f errorcodes$(EXEEXT)
+ $(LINK) $(errorcodes_LDFLAGS) $(errorcodes_OBJECTS) $(errorcodes_LDADD) $(LIBS)
+filter$(EXEEXT): $(filter_OBJECTS) $(filter_DEPENDENCIES)
+ @rm -f filter$(EXEEXT)
+ $(LINK) $(filter_LDFLAGS) $(filter_OBJECTS) $(filter_LDADD) $(LIBS)
+group$(EXEEXT): $(group_OBJECTS) $(group_DEPENDENCIES)
+ @rm -f group$(EXEEXT)
+ $(LINK) $(group_LDFLAGS) $(group_OBJECTS) $(group_LDADD) $(LIBS)
+ipc$(EXEEXT): $(ipc_OBJECTS) $(ipc_DEPENDENCIES)
+ @rm -f ipc$(EXEEXT)
+ $(LINK) $(ipc_LDFLAGS) $(ipc_OBJECTS) $(ipc_LDADD) $(LIBS)
+locks$(EXEEXT): $(locks_OBJECTS) $(locks_DEPENDENCIES)
+ @rm -f locks$(EXEEXT)
+ $(LINK) $(locks_LDFLAGS) $(locks_OBJECTS) $(locks_LDADD) $(LIBS)
+member$(EXEEXT): $(member_OBJECTS) $(member_DEPENDENCIES)
+ @rm -f member$(EXEEXT)
+ $(LINK) $(member_LDFLAGS) $(member_OBJECTS) $(member_LDADD) $(LIBS)
+multisync$(EXEEXT): $(multisync_OBJECTS) $(multisync_DEPENDENCIES)
+ @rm -f multisync$(EXEEXT)
+ $(LINK) $(multisync_LDFLAGS) $(multisync_OBJECTS) $(multisync_LDADD) $(LIBS)
+plugin$(EXEEXT): $(plugin_OBJECTS) $(plugin_DEPENDENCIES)
+ @rm -f plugin$(EXEEXT)
+ $(LINK) $(plugin_LDFLAGS) $(plugin_OBJECTS) $(plugin_LDADD) $(LIBS)
+sync$(EXEEXT): $(sync_OBJECTS) $(sync_DEPENDENCIES)
+ @rm -f sync$(EXEEXT)
+ $(LINK) $(sync_LDFLAGS) $(sync_OBJECTS) $(sync_LDADD) $(LIBS)
+user$(EXEEXT): $(user_OBJECTS) $(user_DEPENDENCIES)
+ @rm -f user$(EXEEXT)
+ $(LINK) $(user_LDFLAGS) $(user_OBJECTS) $(user_LDADD) $(LIBS)
+vcal$(EXEEXT): $(vcal_OBJECTS) $(vcal_DEPENDENCIES)
+ @rm -f vcal$(EXEEXT)
+ $(LINK) $(vcal_LDFLAGS) $(vcal_OBJECTS) $(vcal_LDADD) $(LIBS)
+vcard$(EXEEXT): $(vcard_OBJECTS) $(vcard_DEPENDENCIES)
+ @rm -f vcard$(EXEEXT)
+ $(LINK) $(vcard_LDFLAGS) $(vcard_OBJECTS) $(vcard_LDADD) $(LIBS)
+vnote$(EXEEXT): $(vnote_OBJECTS) $(vnote_DEPENDENCIES)
+ @rm -f vnote$(EXEEXT)
+ $(LINK) $(vnote_LDFLAGS) $(vnote_OBJECTS) $(vnote_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_codes.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_conv.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_env.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_error.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_filter.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_group.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_ipc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_lock.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_member.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_multisync.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_plugins.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_sync.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_user.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_vcal.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_vcard.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_vnote.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/support.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+check-TESTS: $(TESTS)
+ @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+ srcdir=$(srcdir); export srcdir; \
+ list='$(TESTS)'; \
+ if test -n "$$list"; then \
+ for tst in $$list; do \
+ if test -f ./$$tst; then dir=./; \
+ elif test -f $$tst; then dir=; \
+ else dir="$(srcdir)/"; fi; \
+ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *" $$tst "*) \
+ xpass=`expr $$xpass + 1`; \
+ failed=`expr $$failed + 1`; \
+ echo "XPASS: $$tst"; \
+ ;; \
+ *) \
+ echo "PASS: $$tst"; \
+ ;; \
+ esac; \
+ elif test $$? -ne 77; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *" $$tst "*) \
+ xfail=`expr $$xfail + 1`; \
+ echo "XFAIL: $$tst"; \
+ ;; \
+ *) \
+ failed=`expr $$failed + 1`; \
+ echo "FAIL: $$tst"; \
+ ;; \
+ esac; \
+ else \
+ skip=`expr $$skip + 1`; \
+ echo "SKIP: $$tst"; \
+ fi; \
+ done; \
+ if test "$$failed" -eq 0; then \
+ if test "$$xfail" -eq 0; then \
+ banner="All $$all tests passed"; \
+ else \
+ banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
+ fi; \
+ else \
+ if test "$$xpass" -eq 0; then \
+ banner="$$failed of $$all tests failed"; \
+ else \
+ banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
+ fi; \
+ fi; \
+ dashes="$$banner"; \
+ skipped=""; \
+ if test "$$skip" -ne 0; then \
+ skipped="($$skip tests were not run)"; \
+ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$skipped"; \
+ fi; \
+ report=""; \
+ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+ report="Please report to $(PACKAGE_BUGREPORT)"; \
+ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$report"; \
+ fi; \
+ dashes=`echo "$$dashes" | sed s/./=/g`; \
+ echo "$$dashes"; \
+ echo "$$banner"; \
+ test -z "$$skipped" || echo "$$skipped"; \
+ test -z "$$report" || echo "$$report"; \
+ echo "$$dashes"; \
+ test "$$failed" -eq 0; \
+ else :; fi
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+ list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(mkdir_p) "$(distdir)/$$subdir" \
+ || exit 1; \
+ distdir=`$(am__cd) $(distdir) && pwd`; \
+ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+ (cd $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$top_distdir" \
+ distdir="$$distdir/$$subdir" \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-recursive
+all-am: Makefile $(PROGRAMS)
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-libtool distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-TESTS \
+ check-am clean clean-generic clean-libtool \
+ clean-noinstPROGRAMS clean-recursive ctags ctags-recursive \
+ distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-recursive distclean-tags distdir \
+ dvi dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-exec install-exec-am \
+ install-info install-info-am install-man install-strip \
+ installcheck installcheck-am installdirs installdirs-am \
+ maintainer-clean maintainer-clean-generic \
+ maintainer-clean-recursive mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \
+ pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+ uninstall-info-am
+
+
+clean:
+ rm -rf coverage/*
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/debian/opensync/opensync-0.22/tests/check_codes.c b/debian/opensync/opensync-0.22/tests/check_codes.c
new file mode 100644
index 00000000..62bcab29
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/check_codes.c
@@ -0,0 +1,1143 @@
+#include "support.h"
+
+START_TEST (single_init_error)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ setenv("INIT_NULL", "2", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+
+ fail_unless(!osengine_init(engine, &error), NULL);
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ osync_error_free(&error);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" != \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (dual_connect_error)
+{
+ char *testbed = setup_testbed("sync_easy_new");
+
+ setenv("CONNECT_ERROR", "3", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ fail_unless(num_member_connect_errors == 2, NULL);
+ fail_unless(num_connected == 0, NULL);
+ fail_unless(num_disconnected == 0, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+
+ osync_error_free(&error);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" != \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (one_of_two_connect_error)
+{
+ char *testbed = setup_testbed("sync_easy_new");
+
+ setenv("CONNECT_ERROR", "1", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ fail_unless(num_member_connect_errors == 1, NULL);
+ fail_unless(num_connected == 1, NULL);
+ fail_unless(num_disconnected == 1, NULL);
+ fail_unless(num_member_sent_changes == 0, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+
+ osync_error_free(&error);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" != \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (two_of_three_connect_error)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ setenv("CONNECT_ERROR", "5", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ fail_unless(num_member_connect_errors == 2, NULL);
+ fail_unless(num_connected == 1, NULL);
+ fail_unless(num_disconnected == 1, NULL);
+ fail_unless(num_member_sent_changes == 0, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+
+ osync_error_free(&error);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" != \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (two_of_three_connect_error2)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ setenv("CONNECT_ERROR", "6", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ fail_unless(num_member_connect_errors == 2, NULL);
+ fail_unless(num_connected == 1, NULL);
+ fail_unless(num_disconnected == 1, NULL);
+ fail_unless(num_member_sent_changes == 0, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+
+ osync_error_free(&error);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" != \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (three_of_three_connect_error)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ setenv("CONNECT_ERROR", "7", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ fail_unless(num_member_connect_errors == 3, NULL);
+ fail_unless(num_connected == 0, NULL);
+ fail_unless(num_disconnected == 0, NULL);
+ fail_unless(num_member_sent_changes == 0, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+
+ osync_error_free(&error);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" != \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (one_of_three_connect_error)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ setenv("CONNECT_ERROR", "2", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ fail_unless(num_member_connect_errors == 1, NULL);
+ fail_unless(num_connected == 2, NULL);
+ fail_unless(num_disconnected == 2, NULL);
+ fail_unless(num_member_sent_changes == 0, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+
+ osync_error_free(&error);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" != \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (no_connect_error)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ setenv("CONNECT_ERROR", "0", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(synchronize_once(engine, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_connected == 3, NULL);
+ fail_unless(num_disconnected == 3, NULL);
+ fail_unless(num_member_sent_changes == 3, NULL);
+ fail_unless(num_engine_errors == 0, NULL);
+ fail_unless(num_engine_successfull == 1, NULL);
+
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" == \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" == \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (single_get_changes_error)
+{
+ char *testbed = setup_testbed("sync_easy_conflict");
+
+ setenv("GET_CHANGES_ERROR", "2", TRUE);
+ setenv("NO_COMMITTED_ALL_CHECK", "1", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_connected == 2, NULL);
+ fail_unless(num_disconnected == 2, NULL);
+ fail_unless(num_member_get_changes_errors == 1, NULL);
+ fail_unless(num_written == 0, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+ fail_unless(num_engine_successfull == 0, NULL);
+
+ osync_error_free(&error);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" != \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (dual_get_changes_error)
+{
+ char *testbed = setup_testbed("sync_easy_conflict");
+
+ setenv("GET_CHANGES_ERROR", "3", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_connected == 2, NULL);
+ fail_unless(num_disconnected == 2, NULL);
+ fail_unless(num_member_sent_changes == 0, NULL);
+ fail_unless(num_read == 0, NULL);
+ fail_unless(num_written == 0, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+ fail_unless(num_engine_successfull == 0, NULL);
+
+ osync_error_free(&error);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" != \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (two_of_three_get_changes_error)
+{
+ char *testbed = setup_testbed("multisync_conflict_data_choose2");
+
+ setenv("GET_CHANGES_ERROR", "5", TRUE);
+ setenv("NO_COMMITTED_ALL_CHECK", "1", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_connected == 3, NULL);
+ fail_unless(num_disconnected == 3, NULL);
+ fail_unless(num_written == 0, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+ fail_unless(num_engine_successfull == 0, NULL);
+
+ osync_error_free(&error);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" != \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (one_of_three_get_changes_error)
+{
+ char *testbed = setup_testbed("multisync_conflict_data_choose2");
+
+ setenv("GET_CHANGES_ERROR", "1", TRUE);
+ setenv("NO_COMMITTED_ALL_CHECK", "1", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_connected == 3, NULL);
+ fail_unless(num_disconnected == 3, NULL);
+ fail_unless(num_member_get_changes_errors == 1, NULL);
+ fail_unless(num_written == 0, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+ fail_unless(num_engine_successfull == 0, NULL);
+
+ osync_error_free(&error);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" != \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (single_commit_error)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ setenv("COMMIT_ERROR", "4", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_mappingstatus_callback(engine, mapping_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ mark_point();
+ osync_error_free(&error);
+ mark_point();
+ osengine_finalize(engine);
+ mark_point();
+ osengine_free(engine);
+
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_connected == 3, NULL);
+ fail_unless(num_disconnected == 3, NULL);
+ fail_unless(num_member_sent_changes == 3, NULL);
+ fail_unless(num_read == 1, NULL);
+ fail_unless(num_written == 1, NULL);
+ fail_unless(num_written_errors == 1, NULL);
+ fail_unless(num_mapping_errors == 1, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+ fail_unless(num_engine_successfull == 0, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" == \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" != \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (dual_commit_error)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ setenv("COMMIT_ERROR", "6", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_mappingstatus_callback(engine, mapping_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ mark_point();
+ osync_error_free(&error);
+ mark_point();
+ osengine_finalize(engine);
+ mark_point();
+ osengine_free(engine);
+
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_connected == 3, NULL);
+ fail_unless(num_disconnected == 3, NULL);
+ fail_unless(num_member_sent_changes == 3, NULL);
+ fail_unless(num_read == 1, NULL);
+ fail_unless(num_written == 0, NULL);
+ fail_unless(num_written_errors == 2, NULL);
+ fail_unless(num_mapping_errors == 2, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+ fail_unless(num_engine_successfull == 0, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" != \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" != \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (commit_error_modify)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_mappingstatus_callback(engine, mapping_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(synchronize_once(engine, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ setenv("COMMIT_TIMEOUT", "2", TRUE);
+ setenv("COMMIT_ERROR", "4", TRUE);
+
+ sleep(2);
+
+ system("cp newdata2 data1/testdata");
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ mark_point();
+ osync_error_free(&error);
+ mark_point();
+ osengine_finalize(engine);
+ mark_point();
+ osengine_free(engine);
+
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_connected == 3, NULL);
+ fail_unless(num_disconnected == 3, NULL);
+ fail_unless(num_member_sent_changes == 3, NULL);
+ fail_unless(num_read == 1, NULL);
+ fail_unless(num_written == 0, NULL);
+ fail_unless(num_written_errors == 2, NULL);
+ fail_unless(num_mapping_errors == 2, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+ fail_unless(num_engine_successfull == 0, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" != \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" != \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data2 data3)\" == \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (commit_error_delete)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_mappingstatus_callback(engine, mapping_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(synchronize_once(engine, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ setenv("COMMIT_TIMEOUT", "2", TRUE);
+ setenv("COMMIT_ERROR", "4", TRUE);
+
+ sleep(2);
+
+ system("rm -f data1/testdata");
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ mark_point();
+ osync_error_free(&error);
+ mark_point();
+ osengine_finalize(engine);
+ mark_point();
+ osengine_free(engine);
+
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_connected == 3, NULL);
+ fail_unless(num_disconnected == 3, NULL);
+ fail_unless(num_member_sent_changes == 3, NULL);
+ fail_unless(num_read == 1, NULL);
+ fail_unless(num_written == 0, NULL);
+ fail_unless(num_written_errors == 2, NULL);
+ fail_unless(num_mapping_errors == 2, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+ fail_unless(num_engine_successfull == 0, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" != \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" != \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data2 data3)\" == \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (committed_all_error)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ setenv("COMMITTED_ALL_ERROR", "3", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_mappingstatus_callback(engine, mapping_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ mark_point();
+ osync_error_free(&error);
+ mark_point();
+ osengine_finalize(engine);
+ mark_point();
+ osengine_free(engine);
+
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_connected == 3, NULL);
+ fail_unless(num_disconnected == 3, NULL);
+ fail_unless(num_member_sent_changes == 3, NULL);
+ fail_unless(num_read == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+ fail_unless(num_written_errors == 0, NULL);
+ fail_unless(num_mapping_errors == 0, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+ fail_unless(num_engine_successfull == 0, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (committed_all_batch_error)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ setenv("BATCH_COMMIT", "7", TRUE);
+ setenv("COMMITTED_ALL_ERROR", "3", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_mappingstatus_callback(engine, mapping_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ mark_point();
+ osync_error_free(&error);
+ mark_point();
+ osengine_finalize(engine);
+ mark_point();
+ osengine_free(engine);
+
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_connected == 3, NULL);
+ fail_unless(num_disconnected == 3, NULL);
+ fail_unless(num_member_sent_changes == 3, NULL);
+ fail_unless(num_read == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+ fail_unless(num_written_errors == 0, NULL);
+ fail_unless(num_mapping_errors == 0, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+ fail_unless(num_engine_successfull == 0, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (single_sync_done_error)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ setenv("SYNC_DONE_ERROR", "4", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_mappingstatus_callback(engine, mapping_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ mark_point();
+ osync_error_free(&error);
+ mark_point();
+ osengine_finalize(engine);
+ mark_point();
+ osengine_free(engine);
+
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_connected == 3, NULL);
+ fail_unless(num_disconnected == 3, NULL);
+ fail_unless(num_member_sent_changes == 3, NULL);
+ fail_unless(num_read == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+ fail_unless(num_written_errors == 0, NULL);
+ fail_unless(num_mapping_errors == 0, NULL);
+ fail_unless(num_member_sync_done_errors == 1, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+ fail_unless(num_engine_successfull == 0, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" == \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" == \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (dual_sync_done_error)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ setenv("SYNC_DONE_ERROR", "6", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_mappingstatus_callback(engine, mapping_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ mark_point();
+ osync_error_free(&error);
+ mark_point();
+ osengine_finalize(engine);
+ mark_point();
+ osengine_free(engine);
+
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_connected == 3, NULL);
+ fail_unless(num_disconnected == 3, NULL);
+ fail_unless(num_member_sent_changes == 3, NULL);
+ fail_unless(num_read == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+ fail_unless(num_written_errors == 0, NULL);
+ fail_unless(num_mapping_errors == 0, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_member_sync_done_errors == 2, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+ fail_unless(num_engine_successfull == 0, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" == \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" == \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (triple_sync_done_error)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ setenv("SYNC_DONE_ERROR", "7", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_mappingstatus_callback(engine, mapping_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ mark_point();
+ osync_error_free(&error);
+ mark_point();
+ osengine_finalize(engine);
+ mark_point();
+ osengine_free(engine);
+
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_connected == 3, NULL);
+ fail_unless(num_disconnected == 3, NULL);
+ fail_unless(num_member_sent_changes == 3, NULL);
+ fail_unless(num_read == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+ fail_unless(num_written_errors == 0, NULL);
+ fail_unless(num_mapping_errors == 0, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_member_sync_done_errors == 3, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+ fail_unless(num_engine_successfull == 0, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" == \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" == \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (single_disconnect_error)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ setenv("DISCONNECT_ERROR", "4", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_mappingstatus_callback(engine, mapping_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(synchronize_once(engine, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ mark_point();
+ osync_error_free(&error);
+ mark_point();
+ osengine_finalize(engine);
+ mark_point();
+ osengine_free(engine);
+
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_connected == 3, NULL);
+ fail_unless(num_disconnected == 2, NULL);
+ fail_unless(num_member_sent_changes == 3, NULL);
+ fail_unless(num_read == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+ fail_unless(num_written_errors == 0, NULL);
+ fail_unless(num_mapping_errors == 0, NULL);
+ fail_unless(num_member_sync_done_errors == 0, NULL);
+ fail_unless(num_member_disconnect_errors == 1, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_engine_errors == 0, NULL);
+ fail_unless(num_engine_successfull == 1, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" == \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" == \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (dual_disconnect_error)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ setenv("DISCONNECT_ERROR", "6", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_mappingstatus_callback(engine, mapping_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(synchronize_once(engine, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ mark_point();
+ osync_error_free(&error);
+ mark_point();
+ osengine_finalize(engine);
+ mark_point();
+ osengine_free(engine);
+
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_connected == 3, NULL);
+ fail_unless(num_disconnected == 1, NULL);
+ fail_unless(num_member_sent_changes == 3, NULL);
+ fail_unless(num_read == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+ fail_unless(num_written_errors == 0, NULL);
+ fail_unless(num_mapping_errors == 0, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_member_sync_done_errors == 0, NULL);
+ fail_unless(num_member_disconnect_errors == 2, NULL);
+ fail_unless(num_engine_errors == 0, NULL);
+ fail_unless(num_engine_successfull == 1, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" == \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" == \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (triple_disconnect_error)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ setenv("DISCONNECT_ERROR", "7", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_mappingstatus_callback(engine, mapping_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(synchronize_once(engine, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ mark_point();
+ osync_error_free(&error);
+ mark_point();
+ osengine_finalize(engine);
+ mark_point();
+ osengine_free(engine);
+
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_connected == 3, NULL);
+ fail_unless(num_disconnected == 0, NULL);
+ fail_unless(num_member_sent_changes == 3, NULL);
+ fail_unless(num_read == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+ fail_unless(num_written_errors == 0, NULL);
+ fail_unless(num_mapping_errors == 0, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_member_sync_done_errors == 0, NULL);
+ fail_unless(num_member_disconnect_errors == 3, NULL);
+ fail_unless(num_engine_errors == 0, NULL);
+ fail_unless(num_engine_successfull == 1, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" == \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" == \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+/*
+START_TEST (get_changes_disconnect_error)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ setenv("DISCONNECT_TIMEOUT", "1", TRUE);
+ setenv("DISCONNECT_ERROR", "2", TRUE);
+ setenv("GET_CHANGES_TIMEOUT", "6", TRUE);
+ setenv("NO_COMMITTED_ALL_CHECK", "1", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_mappingstatus_callback(engine, mapping_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_connected == 3, NULL);
+ fail_unless(num_disconnected == 1, NULL);
+ fail_unless(num_member_sent_changes == 1, NULL);
+ fail_unless(num_read == 1, NULL);
+ fail_unless(num_written == 0, NULL);
+ fail_unless(num_written_errors == 0, NULL);
+ fail_unless(num_mapping_errors == 0, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_member_sync_done_errors == 0, NULL);
+ fail_unless(num_member_disconnect_errors == 2, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+ fail_unless(num_engine_successfull == 0, NULL);
+
+ mark_point();
+ osync_error_free(&error);
+ mark_point();
+ osengine_finalize(engine);
+ mark_point();
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" != \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" != \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+*/
+
+Suite *multisync_suite(void)
+{
+ Suite *s = suite_create("Error Codes");
+ //Suite *s2 = suite_create("Error Codes");
+ create_case(s, "single_init_error", single_init_error);
+ create_case(s, "dual_connect_error", dual_connect_error);
+ create_case(s, "one_of_two_connect_error", one_of_two_connect_error);
+ create_case(s, "two_of_three_connect_error", two_of_three_connect_error);
+ create_case(s, "two_of_three_connect_error2", two_of_three_connect_error2);
+ create_case(s, "three_of_three_connect_error", three_of_three_connect_error);
+ create_case(s, "one_of_three_connect_error", one_of_three_connect_error);
+ create_case(s, "no_connect_error", no_connect_error);
+ create_case(s, "single_get_changes_error", single_get_changes_error);
+ create_case(s, "dual_get_changes_error", dual_get_changes_error);
+ create_case(s, "two_of_three_get_changes_error", two_of_three_get_changes_error);
+ create_case(s, "one_of_three_get_changes_error", one_of_three_get_changes_error);
+
+ create_case(s, "single_commit_error", single_commit_error);
+ create_case(s, "dual_commit_error", dual_commit_error);
+
+ create_case(s, "commit_error_modify", commit_error_modify);
+ create_case(s, "commit_error_delete", commit_error_delete);
+ create_case(s, "committed_all_error", committed_all_error);
+ create_case(s, "committed_all_batch_error", committed_all_batch_error);
+ create_case(s, "single_sync_done_error", single_sync_done_error);
+ create_case(s, "dual_sync_done_error", dual_sync_done_error);
+ create_case(s, "triple_sync_done_error", triple_sync_done_error);
+
+ create_case(s, "single_disconnect_error", single_disconnect_error);
+ create_case(s, "dual_disconnect_error", dual_disconnect_error);
+ create_case(s, "triple_disconnect_error", triple_disconnect_error);
+
+ /*
+ create_case(s, "get_changes_disconnect_error", get_changes_disconnect_error);
+ */
+
+ return s;
+}
+
+int main(void)
+{
+ int nf;
+
+ Suite *s = multisync_suite();
+
+ SRunner *sr;
+ sr = srunner_create(s);
+
+// srunner_set_fork_status (sr, CK_NOFORK);
+ srunner_run_all(sr, CK_NORMAL);
+ nf = srunner_ntests_failed(sr);
+ srunner_free(sr);
+ return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/debian/opensync/opensync-0.22/tests/check_conv.c b/debian/opensync/opensync-0.22/tests/check_conv.c
new file mode 100644
index 00000000..906c3551
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/check_conv.c
@@ -0,0 +1,1024 @@
+#include "support.h"
+
+/*FIXME: fix warnings about memory leaks when running the test
+ */
+
+START_TEST (conv_env_create)
+{
+ OSyncEnv *osync = init_env_none();
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+ fail_unless(env != NULL, "env == NULL on creation");
+}
+END_TEST
+
+START_TEST (conv_env_add_type)
+{
+ OSyncEnv *env = init_env_none();
+ osync_env_register_objtype(env, "test");
+ OSyncObjTypeTemplate *type = env->objtype_templates->data;
+ fail_unless(type != NULL, "type == NULL on creation");
+ fail_unless(!strcmp(type->name, "test"), "string not test");
+}
+END_TEST
+
+START_TEST (conv_env_add_type_find)
+{
+ OSyncEnv *osync = init_env_none();
+ osync_env_register_objtype(osync, "test");
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+
+ OSyncObjType *type = osync_conv_find_objtype(env, "test");
+ fail_unless(type != NULL, "type == NULL on creation");
+ //fail_unless(osynctype->mergeable == FALSE, "mergable set wrong");
+ fail_unless(!strcmp(osync_objtype_get_name(type), "test"), "string not test2");
+}
+END_TEST
+
+START_TEST (conv_env_add_type_find_false)
+{
+ OSyncEnv *osync = init_env_none();
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+ osync_env_register_objtype(osync, "test");
+ OSyncObjType *type = osync_conv_find_objtype(env, "test2");
+ fail_unless(type == NULL, "type != NULL by false find");
+}
+END_TEST
+
+START_TEST (conv_env_type_register2)
+{
+ OSyncEnv *osync = init_env_none();
+
+ osync_env_register_objtype(osync, "test");
+ osync_env_register_objtype(osync, "test");
+
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+ fail_unless(g_list_length(env->objtypes) == 1, "type1 != type2");
+}
+END_TEST
+
+START_TEST (conv_env_add_format)
+{
+ OSyncEnv *osync = init_env_none();
+
+ osync_env_register_objtype(osync, "test");
+ osync_env_register_objformat(osync, "test", "fmt_test");
+
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+
+ OSyncObjFormat *format1 = osync_conv_find_objformat(env, "fmt_test");
+ fail_unless(format1->objtype != NULL, "objtype not set");
+ fail_unless(g_list_nth_data(format1->objtype->formats, 0) == format1, "Format not added to objtype list");
+}
+END_TEST
+
+START_TEST (conv_env_set_format_string)
+{
+ OSyncEnv *osenv = osync_env_new();
+
+ mark_point();
+ osync_env_register_objtype(osenv, "test");
+ mark_point();
+ osync_env_register_objformat(osenv, "test", "fmt_test");
+
+ mark_point();
+ OSyncGroup *group = osync_group_new(osenv);
+ OSyncMember *member = osync_member_new(group);
+
+ mark_point();
+ OSyncChange *change = osync_change_new();
+ osync_change_set_member(change, member);
+ osync_change_set_objformat_string(change, "fmt_test");
+
+ fail_unless(osync_change_get_objformat(change) == group->conv_env->objformats->data, NULL);
+}
+END_TEST
+
+static osync_bool dummyconvert(void *user_data, char *input, int inpsize, char **output, int *outpsize, osync_bool *free_input, OSyncError **error)
+{
+ *free_input = TRUE;
+ *output = g_strdup("test");
+ *outpsize = 5;
+ return TRUE;
+}
+
+static char dummy_data[1] = { 0 };
+
+static OSyncChange *create_change(OSyncObjFormat *fmt, char *data, size_t datasize)
+{
+ OSyncChange *chg = osync_change_new();
+ osync_change_set_objformat(chg, fmt);
+ osync_change_set_data(chg, data, datasize, TRUE);
+ return chg;
+}
+
+START_TEST (conv_env_add_converters)
+{
+ OSyncEnv *osync = init_env_none();
+
+ osync_env_register_objtype(osync, "test");
+ osync_env_register_objformat(osync, "test", "fmt_test1");
+ osync_env_register_objformat(osync, "test", "fmt_test2");
+ osync_env_register_objformat(osync, "test", "fmt_test3");
+ osync_env_register_converter(osync, CONVERTER_CONV, "fmt_test1", "fmt_test2", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "fmt_test2", "fmt_test3", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_DECAP, "fmt_test3", "fmt_test2", dummyconvert);
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+
+ /* The first converter will resolve */
+
+ fail_unless(g_list_length(env->converters) == 3, NULL);
+
+ OSyncFormatConverter *converter = osync_conv_find_converter(env, "fmt_test1", "fmt_test2");
+ fail_unless(converter != NULL, NULL);
+ fail_unless(converter->type == CONVERTER_CONV, NULL);
+ fail_unless(!strcmp(converter->source_format->name,"fmt_test1") , NULL);
+ fail_unless(!strcmp(converter->target_format->name,"fmt_test2") , NULL);
+ fail_unless(converter->convert_func == dummyconvert, NULL);
+
+
+
+ /* Now all converters should be found */
+ OSyncFormatConverter *converter1 = osync_conv_find_converter(env, "fmt_test1", "fmt_test2");
+ fail_unless(converter1 == converter, NULL); /* Should be the same converter found above */
+
+ OSyncFormatConverter *converter2 = osync_conv_find_converter(env, "fmt_test2", "fmt_test3");
+ fail_unless(converter2 != NULL, NULL);
+ fail_unless(converter2->type == CONVERTER_ENCAP, NULL);
+ fail_unless(!strcmp(converter2->source_format->name,"fmt_test2") , NULL);
+ fail_unless(!strcmp(converter2->target_format->name,"fmt_test3") , NULL);
+ fail_unless(converter2->convert_func == dummyconvert, NULL);
+
+ OSyncFormatConverter *converter3 = osync_conv_find_converter(env, "fmt_test3", "fmt_test2");
+ fail_unless(converter3 != NULL, NULL);
+ fail_unless(converter3->type == CONVERTER_DECAP, NULL);
+ fail_unless(!strcmp(converter3->source_format->name,"fmt_test3") , NULL);
+ fail_unless(!strcmp(converter3->target_format->name,"fmt_test2") , NULL);
+ fail_unless(converter3->convert_func == dummyconvert, NULL);
+}
+END_TEST
+
+START_TEST (conv_env_add_converters_missing)
+{
+ OSyncEnv *osync = init_env_none();
+
+ osync_env_register_objtype(osync, "test");
+ osync_env_register_objformat(osync, "test", "fmt_test1");
+ osync_env_register_objformat(osync, "test", "fmt_test2");
+ osync_env_register_converter(osync, CONVERTER_CONV, "fmt_test1", "fmt_test2", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "fmt_test2", "fmt_test3", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_DECAP, "fmt_test3", "fmt_test2", dummyconvert);
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+
+ fail_unless(g_list_length(env->converters) == 1, NULL);
+
+ OSyncFormatConverter *converter = osync_conv_find_converter(env, "fmt_test1", "fmt_test2");
+ fail_unless(converter != NULL, NULL);
+ fail_unless(converter->type == CONVERTER_CONV, NULL);
+ fail_unless(!strcmp(converter->source_format->name,"fmt_test1") , NULL);
+ fail_unless(!strcmp(converter->target_format->name,"fmt_test2") , NULL);
+ fail_unless(converter->convert_func == dummyconvert, NULL);
+
+ OSyncFormatConverter *converter1 = osync_conv_find_converter(env, "fmt_test3", "fmt_test2");
+ fail_unless(converter1 == NULL, NULL);
+
+ OSyncFormatConverter *converter2 = osync_conv_find_converter(env, "fmt_test2", "fmt_test3");
+ fail_unless(converter2 == NULL, NULL);
+}
+END_TEST
+
+START_TEST (conv_env_osp_simple)
+{
+ OSyncEnv *osync = init_env_none();
+ osync_env_register_objtype(osync, "test");
+ osync_env_register_objformat(osync, "test", "fmt_test1");
+ osync_env_register_objformat(osync, "test", "fmt_test2");
+ osync_env_register_converter(osync, CONVERTER_CONV, "fmt_test1", "fmt_test2", dummyconvert);
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+
+ OSyncFormatConverter *converter1 = osync_conv_find_converter(env, "fmt_test1", "fmt_test2");
+ fail_unless(converter1 != NULL, NULL);
+ OSyncObjFormat *format1 = osync_conv_find_objformat(env, "fmt_test1");
+ OSyncObjFormat *format2 = osync_conv_find_objformat(env, "fmt_test2");
+ mark_point();
+ GList *converters;
+ OSyncChange *chg = create_change(format1, dummy_data, 1);
+ fail_unless(osync_conv_find_path_fmtlist(env, chg, g_list_append(NULL, format2), &converters), NULL);
+ fail_unless(g_list_length(converters) == 1, NULL);
+ fail_unless(g_list_nth_data(converters, 0) == converter1, NULL);
+}
+END_TEST
+
+START_TEST (conv_env_osp_simple2)
+{
+ OSyncEnv *osync = init_env_none();
+ osync_env_register_objtype(osync, "test");
+ osync_env_register_objformat(osync, "test", "fmt_test1");
+ osync_env_register_objformat(osync, "test", "fmt_test2");
+ osync_env_register_objformat(osync, "test", "fmt_test3");
+ osync_env_register_converter(osync, CONVERTER_CONV, "fmt_test1", "fmt_test2", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_CONV, "fmt_test2", "fmt_test3", dummyconvert);
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+
+ OSyncFormatConverter *converter1 = osync_conv_find_converter(env, "fmt_test1", "fmt_test2");
+ OSyncFormatConverter *converter2 = osync_conv_find_converter(env, "fmt_test2", "fmt_test3");
+ OSyncObjFormat *format1 = osync_conv_find_objformat(env, "fmt_test1");
+ OSyncObjFormat *format3 = osync_conv_find_objformat(env, "fmt_test3");
+ fail_unless(converter1 != NULL, NULL);
+ fail_unless(converter2 != NULL, NULL);
+
+ mark_point();
+ GList *converters;
+ OSyncChange *chg = create_change(format1, dummy_data, 1);
+ fail_unless(osync_conv_find_path_fmtlist(env, chg, g_list_append(NULL, format3), &converters), NULL);
+ fail_unless(g_list_length(converters) == 2, NULL);
+ fail_unless(g_list_nth_data(converters, 0) == converter1, NULL);
+ fail_unless(g_list_nth_data(converters, 1) == converter2, NULL);
+}
+END_TEST
+
+START_TEST (conv_env_osp_false)
+{
+ OSyncEnv *osync = init_env_none();
+
+ osync_env_register_objtype(osync, "test");
+ osync_env_register_objformat(osync, "test", "fmt_test1");
+ osync_env_register_objformat(osync, "test", "fmt_test2");
+ osync_env_register_objformat(osync, "test", "fmt_test3");
+ osync_env_register_converter(osync, CONVERTER_CONV, "fmt_test1", "fmt_test2", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_CONV, "fmt_test3", "fmt_test2", dummyconvert);
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+
+ OSyncObjFormat *format1 = osync_conv_find_objformat(env, "fmt_test1");
+ OSyncObjFormat *format3 = osync_conv_find_objformat(env, "fmt_test3");
+
+ mark_point();
+ GList *converters;
+ OSyncChange *chg = create_change(format1, dummy_data, 1);
+ fail_unless(!osync_conv_find_path_fmtlist(env, chg, g_list_append(NULL, format3), &converters), NULL);
+ fail_unless(converters == FALSE, NULL);
+}
+END_TEST
+
+START_TEST (conv_env_osp_2way)
+{
+ OSyncEnv *osync = init_env_none();
+ osync_env_register_objtype(osync, "test");
+ osync_env_register_objformat(osync, "test", "fmt_test1");
+ osync_env_register_objformat(osync, "test", "fmt_test2");
+ osync_env_register_objformat(osync, "test", "fmt_test3");
+ osync_env_register_objformat(osync, "test", "fmt_test4");
+
+ osync_env_register_converter(osync, CONVERTER_CONV, "fmt_test1", "fmt_test2", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_CONV, "fmt_test2", "fmt_test4", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_CONV, "fmt_test1", "fmt_test3", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_CONV, "fmt_test3", "fmt_test4", dummyconvert);
+
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+
+ OSyncFormatConverter *converter1 = osync_conv_find_converter(env, "fmt_test1", "fmt_test2");
+ OSyncFormatConverter *converter2 = osync_conv_find_converter(env, "fmt_test2", "fmt_test4");
+
+ OSyncObjFormat *format1 = osync_conv_find_objformat(env, "fmt_test1");
+ OSyncObjFormat *format4 = osync_conv_find_objformat(env, "fmt_test4");
+
+ mark_point();
+ GList *converters;
+ OSyncChange *chg = create_change(format1, dummy_data, 1);
+ fail_unless(osync_conv_find_path_fmtlist(env, chg, g_list_append(NULL, format4), &converters), NULL);
+ fail_unless(g_list_length(converters) == 2, NULL);
+ fail_unless(g_list_nth_data(converters, 0) == converter1, NULL);
+ fail_unless(g_list_nth_data(converters, 1) == converter2, NULL);
+}
+END_TEST
+
+START_TEST (conv_env_osp_circular_false)
+{
+ OSyncEnv *osync = init_env_none();
+
+ osync_env_register_objtype(osync, "test");
+
+ osync_env_register_objformat(osync, "test", "fmt_test1");
+ osync_env_register_objformat(osync, "test", "fmt_test2");
+ osync_env_register_objformat(osync, "test", "fmt_test3");
+ osync_env_register_objformat(osync, "test", "fmt_test4");
+
+ osync_env_register_converter(osync, CONVERTER_CONV, "fmt_test1", "fmt_test2", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_CONV, "fmt_test2", "fmt_test3", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_CONV, "fmt_test3", "fmt_test1", dummyconvert);
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+
+ OSyncObjFormat *format1 = osync_conv_find_objformat(env, "fmt_test1");
+ OSyncObjFormat *format4 = osync_conv_find_objformat(env, "fmt_test4");
+
+ mark_point();
+ GList *converters;
+ OSyncChange *chg = create_change(format1, dummy_data, 1);
+ fail_unless(!osync_conv_find_path_fmtlist(env, chg, g_list_append(NULL, format4), &converters), NULL);
+ fail_unless(converters == NULL, NULL);
+}
+END_TEST
+
+START_TEST (conv_env_osp_complex)
+{
+ OSyncEnv *osync = init_env_none();
+
+ osync_env_register_objtype(osync, "test");
+
+ osync_env_register_objformat(osync, "test", "A");
+ osync_env_register_objformat(osync, "test", "B");
+ osync_env_register_objformat(osync, "test", "C");
+ osync_env_register_objformat(osync, "test", "D");
+ osync_env_register_objformat(osync, "test", "E");
+ osync_env_register_objformat(osync, "test", "F");
+ osync_env_register_objformat(osync, "test", "G");
+ osync_env_register_objformat(osync, "test", "H");
+
+ osync_env_register_converter(osync, CONVERTER_CONV, "A", "B", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_CONV, "A", "C", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_CONV, "A", "D", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_CONV, "C", "E", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_CONV, "D", "G", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_CONV, "E", "G", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_CONV, "G", "H", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_CONV, "H", "F", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_CONV, "E", "F", dummyconvert);
+
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+
+ OSyncFormatConverter *converter1 = osync_conv_find_converter(env, "A", "C");
+ OSyncFormatConverter *converter2 = osync_conv_find_converter(env, "C", "E");
+ OSyncFormatConverter *converter3 = osync_conv_find_converter(env, "E", "F");
+
+ OSyncObjFormat *format1 = osync_conv_find_objformat(env, "A");
+ OSyncObjFormat *format2 = osync_conv_find_objformat(env, "F");
+
+ mark_point();
+ GList *converters;
+ OSyncChange *chg = create_change(format1, dummy_data, 1);
+ fail_unless(osync_conv_find_path_fmtlist(env, chg, g_list_append(NULL, format2), &converters), NULL);
+ fail_unless(g_list_length(converters) == 3, NULL);
+ fail_unless(g_list_nth_data(converters, 0) == converter1, NULL);
+ fail_unless(g_list_nth_data(converters, 1) == converter2, NULL);
+ fail_unless(g_list_nth_data(converters, 2) == converter3, NULL);
+}
+END_TEST
+
+static osync_bool convert_addtest(void *user_data, char *input, int inpsize, char **output, int *outpsize, osync_bool *free_input, OSyncError **error)
+{
+ *free_input = TRUE;
+ *output = g_strdup_printf("%stest", input);
+ *outpsize = inpsize + 4;
+ return TRUE;
+}
+
+static osync_bool convert_remtest(void *user_data, char *input, int inpsize, char **output, int *outpsize, osync_bool *free_input, OSyncError **error)
+{
+ *free_input = TRUE;
+ *output = strdup(input);
+ char *test = g_strrstr(*output, "test");
+ *outpsize = 0;
+ if (test) {
+ test[0] = 0;
+ *outpsize = inpsize - 4;
+ return TRUE;
+ } else {
+ output = NULL;
+ return FALSE;
+ }
+}
+
+static osync_bool convert_addtest2(void *user_data, char *input, int inpsize, char **output, int *outpsize, osync_bool *free_input, OSyncError **error)
+{
+ *output = g_strdup_printf("%stest2", input);
+ *outpsize = inpsize + 5;
+ *free_input = TRUE;
+ return TRUE;
+}
+
+static osync_bool convert_remtest2(void *user_data, char *input, int inpsize, char **output, int *outpsize, osync_bool *free_input, OSyncError **error)
+{
+ *free_input = TRUE;
+ *output = strdup(input);
+ char *test = g_strrstr(*output, "test2");
+ *outpsize = 0;
+ if (test) {
+ test[0] = 0;
+ *outpsize = inpsize - 4;
+ return TRUE;
+ } else {
+ output = NULL;
+ return FALSE;
+ }
+}
+
+START_TEST (conv_env_convert1)
+{
+ OSyncEnv *osync = init_env_none();
+
+ osync_env_register_objtype(osync, "O1");
+
+ osync_env_register_objformat(osync, "O1", "F1");
+ osync_env_register_objformat(osync, "O1", "F2");
+ osync_env_register_objformat(osync, "O1", "F3");
+ osync_env_register_converter(osync, CONVERTER_CONV, "F1", "F2", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_CONV, "F2", "F3", convert_addtest2);
+ mark_point();
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+
+ OSyncObjFormat *format1 = osync_conv_find_objformat(env, "F1");
+ OSyncObjFormat *format3 = osync_conv_find_objformat(env, "F3");
+ OSyncObjType *type = osync_conv_find_objtype(env, "O1");
+
+ OSyncChange *change = osync_change_new();
+ osync_change_set_objformat(change, format1);
+ osync_change_set_objtype(change, type);
+ osync_change_set_data(change, "data", 5, TRUE);
+
+ mark_point();
+ osync_change_convert(env, change, format3, NULL);
+
+ char *data = osync_change_get_data(change);
+ fail_unless(!strcmp(data, "datatesttest2"), NULL);
+ OSyncObjFormat *format = change->format;
+ fail_unless(format == format3, NULL);
+}
+END_TEST
+
+START_TEST (conv_env_convert_back)
+{
+ OSyncEnv *osync = init_env_none();
+ osync_env_register_objtype(osync, "O1");
+
+ osync_env_register_objformat(osync, "O1", "F1");
+ osync_env_register_objformat(osync, "O1", "F2");
+ osync_env_register_objformat(osync, "O1", "F3");
+ osync_env_register_converter(osync, CONVERTER_CONV, "F1", "F2", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_CONV, "F2", "F1", convert_remtest);
+ osync_env_register_converter(osync, CONVERTER_CONV, "F2", "F3", convert_addtest2);
+ osync_env_register_converter(osync, CONVERTER_CONV, "F3", "F2", convert_remtest2);
+
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+
+ OSyncObjFormat *format1 = osync_conv_find_objformat(env, "F1");
+ OSyncObjFormat *format3 = osync_conv_find_objformat(env, "F3");
+ OSyncObjType *type = osync_conv_find_objtype(env, "01");
+
+ mark_point();
+ OSyncChange *change = osync_change_new();
+ osync_change_set_objformat(change, format1);
+ osync_change_set_objtype(change, type);
+ osync_change_set_data(change, "data", 5, TRUE);
+
+ mark_point();
+ osync_change_convert(env, change, format3, NULL);
+
+ char *data = osync_change_get_data(change);
+ fail_unless(!strcmp(data, "datatesttest2"), NULL);
+ OSyncObjFormat *format = change->format;
+ fail_unless(format == format3, NULL);
+
+ mark_point();
+ osync_change_convert(env, change, format1, NULL);
+
+ data = osync_change_get_data(change);
+ fail_unless(!strcmp(data, "data"), NULL);
+ format = change->format;
+ fail_unless(format == format1, NULL);
+}
+END_TEST
+
+START_TEST (conv_env_convert_desenc)
+{
+ OSyncEnv *osync = init_env_none();
+
+ osync_env_register_objtype(osync, "O1");
+
+ osync_env_register_objformat(osync, "O1", "F1");
+ osync_env_register_objformat(osync, "O1", "F2");
+ osync_env_register_objformat(osync, "O1", "F3");
+ osync_env_register_converter(osync, CONVERTER_DECAP, "F1", "F2", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F2", "F1", convert_remtest);
+ osync_env_register_converter(osync, CONVERTER_DECAP, "F2", "F3", convert_addtest2);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F3", "F2", convert_remtest2);
+ mark_point();
+
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+
+ OSyncObjFormat *format1 = osync_conv_find_objformat(env, "F1");
+ OSyncObjFormat *format3 = osync_conv_find_objformat(env, "F3");
+ OSyncObjType *type = osync_conv_find_objtype(env, "O1");
+
+ OSyncChange *change = osync_change_new();
+ osync_change_set_objformat(change, format1);
+ osync_change_set_objtype(change, type);
+ osync_change_set_data(change, "data", 5, TRUE);
+
+ mark_point();
+ osync_change_convert(env, change, format3, NULL);
+
+ char *data = osync_change_get_data(change);
+ fail_unless(!strcmp(data, "datatesttest2"), NULL);
+ OSyncObjFormat *format = change->format;
+ fail_unless(format == format3, NULL);
+
+ mark_point();
+ osync_change_convert(env, change, format1, NULL);
+
+ data = osync_change_get_data(change);
+ fail_unless(!strcmp(data, "data"), NULL);
+ format = change->format;
+ fail_unless(format == format1, NULL);
+}
+END_TEST
+
+static osync_bool detect_true(OSyncFormatEnv *env, const char *data, int size)
+{
+ return TRUE;
+}
+
+static osync_bool detect_false(OSyncFormatEnv *env, const char *data, int size)
+{
+ return FALSE;
+}
+
+START_TEST (conv_env_convert_desenc_complex)
+{
+ /* Test if the converter is going on the righ path, when the data detector
+ * for the format reports a specific lower format
+ */
+ OSyncEnv *osync = init_env_none();
+
+ osync_env_register_objtype(osync, "O1");
+
+ osync_env_register_objformat(osync, "O1", "F1");
+ osync_env_register_objformat(osync, "O1", "F2");
+ osync_env_register_detector(osync, "F2", "F4", detect_true);
+ osync_env_register_detector(osync, "F2", "F3", detect_false);
+ osync_env_register_objformat(osync, "O1", "F3");
+ osync_env_register_objformat(osync, "O1", "F4");
+ osync_env_register_objformat(osync, "O1", "F5");
+ osync_env_register_objformat(osync, "O1", "F6");
+ osync_env_register_converter(osync, CONVERTER_DECAP, "F1", "F2", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F2", "F1", convert_remtest);
+ osync_env_register_converter(osync, CONVERTER_DECAP, "F2", "F3", convert_addtest2);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F3", "F2", convert_remtest2);
+ osync_env_register_converter(osync, CONVERTER_DECAP, "F2", "F4", convert_addtest2);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F4", "F2", convert_remtest2);
+ osync_env_register_converter(osync, CONVERTER_CONV, "F3", "F6", convert_addtest2);
+ osync_env_register_converter(osync, CONVERTER_CONV, "F4", "F5", convert_addtest2);
+ osync_env_register_converter(osync, CONVERTER_CONV, "F5", "F4", convert_remtest2);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F5", "F6", convert_addtest2);
+ osync_env_register_converter(osync, CONVERTER_DECAP, "F6", "F5", convert_remtest2);
+
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+
+ OSyncObjFormat *format1 = osync_conv_find_objformat(env, "F1");
+ OSyncObjFormat *format6 = osync_conv_find_objformat(env, "F6");
+ OSyncObjType *type = osync_conv_find_objtype(env, "O1");
+
+ mark_point();
+ OSyncChange *change = osync_change_new();
+ osync_change_set_objformat(change, format1);
+ osync_change_set_objtype(change, type);
+ osync_change_set_data(change, "data", 5, TRUE);
+
+ mark_point();
+ osync_change_convert(env, change, format6, NULL);
+
+ char *data = osync_change_get_data(change);
+ fail_unless(!strcmp(data, "datatesttest2test2test2"), NULL);
+ fail_unless(change->format == format6, NULL);
+
+ mark_point();
+ osync_change_convert(env, change, format1, NULL);
+
+ data = osync_change_get_data(change);
+ fail_unless(!strcmp(data, "data"), NULL);
+ fail_unless(change->format == format1, NULL);
+}
+END_TEST
+
+START_TEST (conv_env_detect_and_convert)
+{
+ /* The data will be detected as F3, so the shortest path should
+ * not be taken because the path searching function should see that
+ * the encapsulated data * is a F3 object, not a F4 object
+ */
+ OSyncEnv *osync = init_env_none();
+
+ osync_env_register_objtype(osync, "O1");
+
+ osync_env_register_objformat(osync, "O1", "F1");
+ osync_env_register_objformat(osync, "O1", "F2");
+ osync_env_register_objformat(osync, "O1", "F3");
+ osync_env_register_objformat(osync, "O1", "F4");
+
+ osync_env_register_detector(osync, "F1", "F2", detect_true);
+
+ /* Detect F3, not F4 */
+ osync_env_register_detector(osync, "F2", "F3", detect_true);
+ osync_env_register_detector(osync, "F2", "F4", detect_false);
+
+ osync_env_register_converter(osync, CONVERTER_DECAP, "F1", "F2", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F2", "F1", convert_remtest);
+ osync_env_register_converter(osync, CONVERTER_DECAP, "F2", "F3", convert_addtest2);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F3", "F2", convert_remtest2);
+ osync_env_register_converter(osync, CONVERTER_DECAP, "F2", "F4", convert_addtest2);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F4", "F2", convert_remtest2);
+ osync_env_register_converter(osync, CONVERTER_CONV, "F3", "F4", convert_addtest2);
+ osync_env_register_converter(osync, CONVERTER_CONV, "F4", "F3", convert_remtest2);
+
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+ OSyncObjFormat *format1 = osync_conv_find_objformat(env, "F1");
+ OSyncObjFormat *format4 = osync_conv_find_objformat(env, "F4");
+ OSyncObjType *type = osync_conv_find_objtype(env, "O1");
+
+ mark_point();
+ OSyncChange *change = osync_change_new();
+ osync_change_set_objformat(change, format1);
+ osync_change_set_data(change, "data", 5, TRUE);
+
+ mark_point();
+
+ fail_unless(osync_change_convert(env, change, format4, NULL), NULL);
+ mark_point();
+ char *data = osync_change_get_data(change);
+ fail_unless(!strcmp(data, "datatesttest2test2"), NULL);
+ fail_unless(change->objtype == type, NULL);
+ OSyncObjFormat *format = change->format;
+ fail_unless(format == format4, NULL);
+
+ mark_point();
+ osync_change_convert(env, change, format1, NULL);
+ mark_point();
+ data = osync_change_get_data(change);
+ fail_unless(!strcmp(data, "datatest"), NULL);
+ format = change->format;
+ fail_unless(format == format1, NULL);
+}
+END_TEST
+
+START_TEST(conv_prefer_not_desencap)
+{
+ /* Test if the converter is getting the path that have no
+ * lossy detectors
+ *
+ * F1 -- F2 -- F3 -- F5
+ * \ /
+ * --- F4 -----
+ *
+ * All converters are not lossy, except F1->F4.
+ * The result path should be: F1 -> F2 -> F3 -> F5
+ */
+ OSyncEnv *osync = init_env_none();
+ osync_env_register_objtype(osync, "O1");
+
+ osync_env_register_objformat(osync, "O1", "F1");
+ osync_env_register_objformat(osync, "O1", "F2");
+ osync_env_register_objformat(osync, "O1", "F3");
+ osync_env_register_objformat(osync, "O1", "F4");
+ osync_env_register_objformat(osync, "O1", "F5");
+
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F1", "F2", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F2", "F3", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F3", "F5", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_DECAP, "F1", "F4", convert_addtest2);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F4", "F5", convert_addtest2);
+ mark_point();
+
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+ OSyncObjFormat *format1 = osync_conv_find_objformat(env, "F1");
+ OSyncObjFormat *format5 = osync_conv_find_objformat(env, "F5");
+ OSyncObjType *type = osync_conv_find_objtype(env, "O1");
+
+ OSyncChange *change = osync_change_new();
+ osync_change_set_objformat(change, format1);
+ osync_change_set_data(change, "data", 5, TRUE);
+
+ mark_point();
+
+ fail_unless(osync_change_convert(env, change, format5, NULL), NULL);
+ mark_point();
+ char *data = osync_change_get_data(change);
+ fail_unless(!strcmp(data, "datatesttesttest"), NULL);
+
+ fail_unless(change->objtype == type, NULL);
+ fail_unless(change->format == format5, NULL);
+}
+END_TEST
+
+START_TEST(conv_prefer_same_objtype)
+{
+ /* Test if the converter is getting the path
+ * that doesn't change the objtype, even
+ * if it is longer.
+ *
+ * Objtypes: F and G
+ *
+ * F1 -- F2 -- F3 -- F5 -- F6
+ * \
+ * --- G1
+ *
+ * The target list will be [ F6, G1 ].
+ *
+ * The result should be F6.
+ */
+ OSyncEnv *osync = init_env_none();
+ osync_env_register_objtype(osync, "F");
+ osync_env_register_objtype(osync, "G");
+
+ osync_env_register_objformat(osync, "F", "F1");
+ osync_env_register_objformat(osync, "F", "F2");
+ osync_env_register_objformat(osync, "F", "F3");
+ osync_env_register_objformat(osync, "F", "F4");
+ osync_env_register_objformat(osync, "F", "F5");
+ osync_env_register_objformat(osync, "F", "F6");
+
+ osync_env_register_objformat(osync, "G", "G1");
+
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F1", "F2", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F2", "F3", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F3", "F4", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F4", "F5", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F5", "F6", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F1", "G1", convert_addtest2);
+ mark_point();
+
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+ OSyncObjFormat *f1 = osync_conv_find_objformat(env, "F1");
+ OSyncObjFormat *f6 = osync_conv_find_objformat(env, "F6");
+ OSyncObjFormat *g1 = osync_conv_find_objformat(env, "G1");
+ OSyncObjType *typef = osync_conv_find_objtype(env, "F");
+
+ OSyncChange *change = osync_change_new();
+ osync_change_set_objformat(change, f1);
+ osync_change_set_data(change, "data", 5, TRUE);
+
+ mark_point();
+
+ GList *targets = g_list_append(NULL, g1);
+ targets = g_list_append(targets, f6);
+ fail_unless(osync_conv_convert_fmtlist(env, change, targets), NULL);
+ mark_point();
+ char *data = osync_change_get_data(change);
+ fail_unless(!strcmp(data, "datatesttesttesttesttest"), NULL);
+
+ fail_unless(change->objtype == typef, NULL);
+ fail_unless(change->format == f6, NULL);
+}
+END_TEST
+
+START_TEST(conv_prefer_not_lossy_objtype_change)
+{
+ /* Test if the converter is getting the path
+ * that have no lossy converters, even if
+ * the objtype is being changed.
+ *
+ * Objtypes: F and G
+ *
+ * F1 -- F2 -- F3 -- F5 -- F6
+ * \
+ * --- G1
+ *
+ * The target list will be [ F6, G1 ].
+ *
+ * The converter F2 -> F3 is lossy.
+ *
+ * The result should be G1.
+ */
+ OSyncEnv *osync = init_env_none();
+ osync_env_register_objtype(osync, "F");
+ osync_env_register_objtype(osync, "G");
+
+ osync_env_register_objformat(osync, "F", "F1");
+ osync_env_register_objformat(osync, "F", "F2");
+ osync_env_register_objformat(osync, "F", "F3");
+ osync_env_register_objformat(osync, "F", "F4");
+ osync_env_register_objformat(osync, "F", "F5");
+ osync_env_register_objformat(osync, "F", "F6");
+
+ osync_env_register_objformat(osync, "G", "G1");
+
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F1", "F2", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_DECAP, "F2", "F3", convert_addtest); /* Lossy */
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F3", "F4", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F4", "F5", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F5", "F6", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F1", "G1", convert_addtest2);
+ mark_point();
+
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+ OSyncObjFormat *f1 = osync_conv_find_objformat(env, "F1");
+ OSyncObjFormat *f6 = osync_conv_find_objformat(env, "F6");
+ OSyncObjFormat *g1 = osync_conv_find_objformat(env, "G1");
+ OSyncObjType *typeg = osync_conv_find_objtype(env, "G");
+
+ OSyncChange *change = osync_change_new();
+ osync_change_set_objformat(change, f1);
+ osync_change_set_data(change, "data", 5, TRUE);
+
+ mark_point();
+
+ GList *targets = g_list_append(NULL, g1);
+ targets = g_list_append(targets, f6);
+ fail_unless(osync_conv_convert_fmtlist(env, change, targets), NULL);
+ mark_point();
+ char *data = osync_change_get_data(change);
+ fail_unless(!strcmp(data, "datatest2"), NULL);
+
+ fail_unless(change->objtype == typeg, NULL);
+ fail_unless(change->format == g1, NULL);
+}
+END_TEST
+
+START_TEST (conv_env_detect_false)
+{
+ OSyncEnv *osync = init_env_none();
+ osync_env_register_objtype(osync, "O1");
+
+ osync_env_register_objformat(osync, "O1", "F1");
+ osync_env_register_objformat(osync, "O1", "F2");
+ osync_env_register_objformat(osync, "O1", "F3");
+ osync_env_register_detector(osync, "F1", "F2", detect_true);
+ osync_env_register_detector(osync, "F2", "F3", detect_false);
+
+ osync_env_register_converter(osync, CONVERTER_DECAP, "F1", "F2", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F2", "F1", convert_remtest);
+ osync_env_register_converter(osync, CONVERTER_DECAP, "F2", "F3", convert_addtest2);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F3", "F2", convert_remtest2);
+
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+ OSyncObjFormat *format1 = osync_conv_find_objformat(env, "F1");
+ OSyncObjFormat *format3 = osync_conv_find_objformat(env, "F3");
+
+ mark_point();
+ OSyncChange *change = osync_change_new();
+ osync_change_set_objformat(change, format1);
+ osync_change_set_data(change, "data", 5, TRUE);
+
+ mark_point();
+ fail_unless(!osync_change_convert(env, change, format3, NULL), NULL);
+}
+END_TEST
+
+static osync_bool detect_plain_as_f2(OSyncFormatEnv *env, const char *data, int size)
+{
+ return TRUE;
+}
+
+START_TEST (conv_env_decap_and_detect)
+{
+ OSyncEnv *osync = init_env_none();
+ osync_env_register_objtype(osync, "O1");
+
+ osync_env_register_objformat(osync, "O1", "F1");
+ osync_env_register_objformat(osync, "O1", "F2");
+ osync_env_register_objformat(osync, "O1", "plain");
+ osync_env_register_objformat(osync, "O1", "F3");
+
+ osync_env_register_detector(osync, "plain", "F2", detect_plain_as_f2);
+
+ osync_env_register_converter(osync, CONVERTER_DECAP, "F1", "plain", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "plain", "F1", convert_remtest);
+ osync_env_register_converter(osync, CONVERTER_CONV, "F2", "F3", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_CONV, "F3", "F2", convert_remtest);
+
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+ OSyncObjFormat *format1 = osync_conv_find_objformat(env, "F1");
+ OSyncObjFormat *format3 = osync_conv_find_objformat(env, "F3");
+
+ mark_point();
+ OSyncChange *change = osync_change_new();
+ osync_change_set_objformat(change, format1);
+ osync_change_set_data(change, "data", 5, TRUE);
+
+ mark_point();
+ OSyncError *error = NULL;
+ fail_unless(osync_change_convert(env, change, format3, &error), NULL);
+ fail_unless(!strcmp(osync_change_get_data(change), "datatesttest"), NULL);
+ fail_unless(osync_change_get_objformat(change) == format3, NULL);
+
+ fail_unless(osync_change_convert(env, change, format1, &error), NULL);
+ fail_unless(!strcmp(osync_change_get_data(change), "data"), NULL);
+ fail_unless(osync_change_get_objformat(change) == format1, NULL);
+}
+END_TEST
+
+static osync_bool detect_f2(OSyncFormatEnv *env, const char *data, int size)
+{
+ if (!strcmp(data, "F2"))
+ return TRUE;
+ return FALSE;
+}
+
+static osync_bool convert_f1_to_f2(void *user_data, char *input, int inpsize, char **output, int *outpsize, osync_bool *free_input, OSyncError **error)
+{
+ fail_unless(!strcmp(input, "F1"), NULL);
+
+ *free_input = TRUE;
+ *output = g_strdup("F2");
+ *outpsize = 3;
+ return TRUE;
+}
+
+static osync_bool convert_f2_to_f1(void *user_data, char *input, int inpsize, char **output, int *outpsize, osync_bool *free_input, OSyncError **error)
+{
+ fail_unless(!strcmp(input, "F2"), NULL);
+
+ *free_input = TRUE;
+ *output = g_strdup("F1");
+ *outpsize = 3;
+ return TRUE;
+}
+
+START_TEST (conv_env_decap_and_detect2)
+{
+ /*This is a more complicated version. Here we specify some data
+ * for the change that needs to be converted and which only gets detected
+ * if it really got converted by the decap */
+ OSyncEnv *osync = init_env_none();
+ osync_env_register_objtype(osync, "O1");
+
+ osync_env_register_objformat(osync, "O1", "F1");
+ osync_env_register_objformat(osync, "O1", "F2");
+ osync_env_register_objformat(osync, "O1", "plain");
+ osync_env_register_objformat(osync, "O1", "F3");
+
+ osync_env_register_detector(osync, "plain", "F2", detect_f2);
+
+ osync_env_register_converter(osync, CONVERTER_DECAP, "F1", "plain", convert_f1_to_f2);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "plain", "F1", convert_f2_to_f1);
+ osync_env_register_converter(osync, CONVERTER_CONV, "F2", "F3", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_CONV, "F3", "F2", convert_remtest);
+
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+ OSyncObjFormat *format1 = osync_conv_find_objformat(env, "F1");
+ OSyncObjFormat *format3 = osync_conv_find_objformat(env, "F3");
+
+ mark_point();
+ OSyncChange *change = osync_change_new();
+ osync_change_set_objformat(change, format1);
+ osync_change_set_data(change, "F1", 3, TRUE);
+
+ mark_point();
+ OSyncError *error = NULL;
+ fail_unless(osync_change_convert(env, change, format3, &error), NULL);
+ fail_unless(!strcmp(osync_change_get_data(change), "F2test"), NULL);
+ fail_unless(osync_change_get_objformat(change) == format3, NULL);
+
+ fail_unless(osync_change_convert(env, change, format1, &error), NULL);
+ fail_unless(!strcmp(osync_change_get_data(change), "F1"), NULL);
+ fail_unless(osync_change_get_objformat(change) == format1, NULL);
+}
+END_TEST
+
+Suite *env_suite(void)
+{
+ Suite *s = suite_create("Conv");
+ //Suite *s2 = suite_create("Conv");
+
+ create_case(s, "conv_env_create", conv_env_create);
+ create_case(s, "conv_env_add_type", conv_env_add_type);
+ create_case(s, "conv_env_add_type_find", conv_env_add_type_find);
+ create_case(s, "conv_env_add_type_find_false", conv_env_add_type_find_false);
+ create_case(s, "conv_env_type_register2", conv_env_type_register2);
+ create_case(s, "conv_env_add_format", conv_env_add_format);
+ create_case(s, "conv_env_set_format_string", conv_env_set_format_string);
+ create_case(s, "conv_env_add_converters", conv_env_add_converters);
+ create_case(s, "conv_env_add_converters_missing", conv_env_add_converters_missing);
+ create_case(s, "conv_env_osp_simple", conv_env_osp_simple);
+ create_case(s, "conv_env_osp_simple2", conv_env_osp_simple2);
+ create_case(s, "conv_env_osp_false", conv_env_osp_false);
+ create_case(s, "conv_env_osp_2way", conv_env_osp_2way);
+ create_case(s, "conv_env_osp_circular_false", conv_env_osp_circular_false);
+ create_case(s, "conv_env_osp_complex", conv_env_osp_complex);
+ create_case(s, "conv_env_convert1", conv_env_convert1);
+ create_case(s, "conv_env_convert_back", conv_env_convert_back);
+ create_case(s, "conv_env_convert_desenc", conv_env_convert_desenc);
+ create_case(s, "conv_env_convert_desenc_complex", conv_env_convert_desenc_complex);
+ create_case(s, "conv_env_detect_and_convert", conv_env_detect_and_convert);
+ create_case(s, "conv_prefer_not_desencap", conv_prefer_not_desencap);
+ create_case(s, "conv_prefer_same_objtype", conv_prefer_same_objtype);
+ create_case(s, "conv_prefer_not_lossy_objtype_change", conv_prefer_not_lossy_objtype_change);
+ create_case(s, "conv_env_detect_false", conv_env_detect_false);
+ create_case(s, "conv_env_decap_and_detect", conv_env_decap_and_detect);
+ create_case(s, "conv_env_decap_and_detect2", conv_env_decap_and_detect2);
+
+ return s;
+}
+
+int main(void)
+{
+ int nf;
+
+ Suite *s = env_suite();
+
+ SRunner *sr;
+ sr = srunner_create(s);
+
+// srunner_set_fork_status (sr, CK_NOFORK);
+ srunner_run_all(sr, CK_NORMAL);
+ nf = srunner_ntests_failed(sr);
+ srunner_free(sr);
+ return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/debian/opensync/opensync-0.22/tests/check_env.c b/debian/opensync/opensync-0.22/tests/check_env.c
new file mode 100644
index 00000000..24a936d6
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/check_env.c
@@ -0,0 +1,219 @@
+#include "support.h"
+
+START_TEST (env_create)
+{
+ char *testbed = setup_testbed(NULL);
+
+ OSyncEnv *os_env = osync_env_new();
+ fail_unless(os_env != NULL, NULL);
+ osync_env_free(os_env);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (env_init)
+{
+ char *testbed = setup_testbed("env_init");
+
+ OSyncEnv *env = osync_env_new();
+ fail_unless(env != NULL, NULL);
+
+ osync_env_set_option(env, "GROUPS_DIRECTORY", "configs");
+ osync_env_set_option(env, "LOAD_PLUGINS", "FALSE");
+
+ fail_unless(osync_env_initialize(env, NULL), NULL);
+
+ fail_unless(osync_env_finalize(env, NULL), NULL);
+ osync_env_free(env);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (env_double_init)
+{
+ char *testbed = setup_testbed("env_init");
+ OSyncEnv *env = osync_env_new();
+ fail_unless(env != NULL, NULL);
+
+ osync_env_set_option(env, "GROUPS_DIRECTORY", "configs");
+ osync_env_set_option(env, "LOAD_PLUGINS", "FALSE");
+ fail_unless(osync_env_initialize(env, NULL), NULL);
+ fail_unless(!osync_env_initialize(env, NULL), NULL);
+
+ fail_unless(osync_env_finalize(env, NULL), NULL);
+ osync_env_free(env);
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (env_pre_fin)
+{
+ char *testbed = setup_testbed("env_init");
+ OSyncEnv *env = osync_env_new();
+ fail_unless(env != NULL, NULL);
+
+ osync_env_set_option(env, "GROUPS_DIRECTORY", "configs");
+
+ fail_unless(!osync_env_finalize(env, NULL), NULL);
+ osync_env_free(env);
+ destroy_testbed(testbed);
+}
+END_TEST
+
+
+START_TEST (env_init_false)
+{
+ char *testbed = setup_testbed("sync_setup_false");
+ OSyncEnv *osync = osync_env_new();
+ osync_env_set_option(osync, "GROUPS_DIRECTORY", "configs");
+ osync_env_set_option(osync, "LOAD_PLUGINS", "FALSE");
+ OSyncError *error = NULL;
+ osync_env_initialize(osync, &error);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (env_init_false2)
+{
+ char *testbed = setup_testbed("sync_setup_false");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ destroy_testbed(testbed);
+}
+END_TEST
+
+/* FIXME:
+ create a _intended_ test bed for sync_false which breaks:
+ osengine_init()
+ synchronize_once()
+*/
+#if 0
+START_TEST (env_sync_false)
+{
+ char *testbed = setup_testbed("sync_setup_false");
+ OSyncEnv *env = init_env();
+
+ OSyncGroup *group = osync_group_load(env, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+
+ OSyncEngine *engine = osengine_new(group, NULL);
+
+ OSyncError *error = NULL;
+
+ fail_unless(!osengine_init(engine, &error), NULL);
+ fail_unless(!synchronize_once(engine, NULL), NULL);
+
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ group = NULL;
+ osync_env_finalize(env, NULL);
+ osync_env_free(env);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+#endif
+
+START_TEST (env_check_plugin_true1)
+{
+ char *testbed = setup_testbed(NULL);
+ OSyncEnv *env = init_env();
+
+ OSyncError *error = NULL;
+ fail_unless(osync_env_plugin_is_usable(env, "file-sync", &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_env_free(env);
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (env_check_plugin_true2)
+{
+ char *testbed = setup_testbed(NULL);
+ setenv("IS_AVAILABLE", "1", TRUE);
+
+ OSyncEnv *env = init_env();
+
+ OSyncError *error = NULL;
+
+ fail_unless(osync_env_plugin_is_usable(env, "file-sync", &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_env_free(env);
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (env_check_plugin_false)
+{
+ char *testbed = setup_testbed(NULL);
+ OSyncEnv *env = init_env();
+
+ OSyncError *error = NULL;
+ fail_unless(!osync_env_plugin_is_usable(env, "file-syncc", &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ osync_env_free(env);
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (env_check_plugin_false2)
+{
+ char *testbed = setup_testbed(NULL);
+ setenv("IS_AVAILABLE", "1", TRUE);
+ setenv("IS_NOT_AVAILABLE", "1", TRUE);
+
+ OSyncEnv *env = init_env();
+
+ OSyncError *error = NULL;
+
+ fail_unless(!osync_env_plugin_is_usable(env, "file-sync", &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ osync_env_free(env);
+ destroy_testbed(testbed);
+}
+END_TEST
+
+Suite *env_suite(void)
+{
+ Suite *s = suite_create("Env");
+ //Suite *s2 = suite_create("Env");
+ create_case(s, "env_create", env_create);
+ create_case(s, "env_init", env_init);
+ create_case(s, "env_double_init", env_double_init);
+ create_case(s, "env_pre_fin", env_pre_fin);
+ create_case(s, "env_init_false", env_init_false);
+ create_case(s, "env_init_false2", env_init_false2);
+// create_case(s, "env_sync_false", env_sync_false);
+ create_case(s, "env_check_plugin_true1", env_check_plugin_true1);
+ create_case(s, "env_check_plugin_true2", env_check_plugin_true2);
+ create_case(s, "env_check_plugin_false", env_check_plugin_false);
+ create_case(s, "env_check_plugin_false2", env_check_plugin_false2);
+
+ return s;
+}
+
+int main(void)
+{
+ int nf;
+
+ Suite *s = env_suite();
+
+ SRunner *sr;
+ sr = srunner_create(s);
+
+// srunner_set_fork_status (sr, CK_NOFORK);
+ srunner_run_all(sr, CK_NORMAL);
+ nf = srunner_ntests_failed(sr);
+ srunner_free(sr);
+ return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/debian/opensync/opensync-0.22/tests/check_error.c b/debian/opensync/opensync-0.22/tests/check_error.c
new file mode 100644
index 00000000..c555c0c1
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/check_error.c
@@ -0,0 +1,201 @@
+#include <check.h>
+#include <opensync/opensync.h>
+#include <opensync/opensync_internals.h>
+
+START_TEST (error_create)
+{
+ OSyncError *error = NULL;
+ osync_error_set(&error, OSYNC_ERROR_GENERIC, "test%i", 1);
+ fail_unless(error != NULL, NULL);
+ fail_unless(error->type == OSYNC_ERROR_GENERIC, NULL);
+ fail_unless(!strcmp(error->message, "test1"), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ osync_error_free(&error);
+ fail_unless(error == NULL, NULL);
+}
+END_TEST
+
+START_TEST (error_create_null)
+{
+ osync_error_set(NULL, OSYNC_ERROR_GENERIC, "test%i", 1);
+}
+END_TEST
+
+START_TEST (error_get_name_null)
+{
+ fail_unless(osync_error_get_name(NULL) == NULL, NULL);
+
+}
+END_TEST
+
+START_TEST (error_get_name_null2)
+{
+ OSyncError *error = NULL;
+ fail_unless(osync_error_get_name(&error) != NULL, NULL);
+
+}
+END_TEST
+
+START_TEST (error_get_name)
+{
+ OSyncError *error = NULL;
+ osync_error_set(&error, OSYNC_ERROR_GENERIC, "test");
+ fail_unless(osync_error_get_name(&error) != NULL, NULL);
+}
+END_TEST
+
+START_TEST (error_free_null)
+{
+ osync_error_free(NULL);
+
+}
+END_TEST
+
+START_TEST (error_free_null2)
+{
+ OSyncError *error = NULL;
+ osync_error_free(&error);
+
+}
+END_TEST
+
+START_TEST (error_free)
+{
+ OSyncError *error = NULL;
+ osync_error_set(&error, OSYNC_ERROR_GENERIC, "test");
+ fail_unless(error != NULL, NULL);
+ osync_error_free(&error);
+ fail_unless(error == NULL, NULL);
+}
+END_TEST
+
+START_TEST (error_check_null)
+{
+ fail_unless(osync_error_is_set(NULL) == FALSE, NULL);
+
+}
+END_TEST
+
+START_TEST (error_check_null2)
+{
+ OSyncError *error = NULL;
+ fail_unless(osync_error_is_set(&error) == FALSE, NULL);
+
+}
+END_TEST
+
+START_TEST (error_check)
+{
+ OSyncError *error = NULL;
+ osync_error_set(&error, OSYNC_ERROR_GENERIC, "test");
+ fail_unless(osync_error_is_set(&error) == TRUE, NULL);
+}
+END_TEST
+
+START_TEST (error_check2)
+{
+ OSyncError *error = NULL;
+ osync_error_set(&error, OSYNC_NO_ERROR, NULL);
+ fail_unless(osync_error_is_set(&error) == FALSE, NULL);
+}
+END_TEST
+
+START_TEST (error_update_null)
+{
+ osync_error_update(NULL, NULL);
+
+}
+END_TEST
+
+START_TEST (error_update_null2)
+{
+ OSyncError *error = NULL;
+ osync_error_update(&error, NULL);
+}
+END_TEST
+
+START_TEST (error_update)
+{
+ OSyncError *error = NULL;
+ osync_error_set(&error, OSYNC_ERROR_GENERIC, "test");
+ osync_error_update(&error, "test2%i", 1);
+ fail_unless(!strcmp(error->message, "test21"), NULL);
+}
+END_TEST
+
+START_TEST (error_update2)
+{
+ OSyncError *error = NULL;
+ osync_error_set(&error, OSYNC_ERROR_GENERIC, "test");
+ osync_error_update(&error, "test2%s", error->message);
+ fail_unless(!strcmp(error->message, "test2test"), NULL);
+}
+END_TEST
+
+START_TEST (error_set_null)
+{
+ osync_error_set(NULL, OSYNC_NO_ERROR, NULL);
+
+}
+END_TEST
+
+START_TEST (error_set_null2)
+{
+ OSyncError *error = NULL;
+ osync_error_update(&error, OSYNC_NO_ERROR, NULL);
+}
+END_TEST
+
+START_TEST (error_duplicate_null)
+{
+ OSyncError *error = NULL;
+ osync_error_set(&error, OSYNC_ERROR_GENERIC, "asd");
+ osync_error_duplicate(NULL, &error);
+}
+END_TEST
+
+Suite *error_suite(void)
+{
+ Suite *s = suite_create("Error");
+ TCase *tc_error = tcase_create("Core");
+
+ suite_add_tcase (s, tc_error);
+ tcase_add_test(tc_error, error_create);
+ tcase_add_test(tc_error, error_create_null);
+ tcase_add_test(tc_error, error_get_name_null);
+ tcase_add_test(tc_error, error_get_name_null2);
+ tcase_add_test(tc_error, error_get_name);
+ tcase_add_test(tc_error, error_free_null);
+ tcase_add_test(tc_error, error_free_null2);
+ tcase_add_test(tc_error, error_free);
+ tcase_add_test(tc_error, error_check_null);
+ tcase_add_test(tc_error, error_check_null2);
+ tcase_add_test(tc_error, error_check);
+ tcase_add_test(tc_error, error_check2);
+ tcase_add_test(tc_error, error_update_null);
+ tcase_add_test(tc_error, error_update_null2);
+ tcase_add_test(tc_error, error_update);
+ tcase_add_test(tc_error, error_update2);
+ tcase_add_test(tc_error, error_set_null);
+ tcase_add_test(tc_error, error_set_null2);
+ tcase_add_test(tc_error, error_duplicate_null);
+
+ return s;
+}
+
+int main(void)
+{
+ int nf;
+
+ Suite *s = error_suite();
+
+ SRunner *sr;
+ sr = srunner_create(s);
+
+// srunner_set_fork_status (sr, CK_NOFORK);
+ srunner_run_all(sr, CK_NORMAL);
+ nf = srunner_ntests_failed(sr);
+ srunner_free(sr);
+ return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/debian/opensync/opensync-0.22/tests/check_filter.c b/debian/opensync/opensync-0.22/tests/check_filter.c
new file mode 100644
index 00000000..6d39c506
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/check_filter.c
@@ -0,0 +1,343 @@
+#include "support.h"
+
+START_TEST (filter_setup)
+{
+ char *testbed = setup_testbed("filter_setup");
+ OSyncEnv *osync = init_env();
+
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ mark_point();
+
+ OSyncMember *leftmember = osync_group_nth_member(group, 0);
+ OSyncMember *rightmember = osync_group_nth_member(group, 1);
+
+ OSyncFilter *filter = osync_filter_add(group, leftmember, rightmember, NULL, NULL, NULL, OSYNC_FILTER_DENY);
+ fail_unless(filter != NULL, NULL);
+
+ mark_point();
+ fail_unless(osync_group_num_filters(group) == 1, NULL);
+ fail_unless(osync_group_nth_filter(group, 0) == filter, NULL);
+
+ mark_point();
+ osync_filter_remove(group, filter);
+ fail_unless(osync_group_num_filters(group) == 0, NULL);
+ osync_filter_free(filter);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (filter_flush)
+{
+ char *testbed = setup_testbed("filter_setup");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ mark_point();
+
+ OSyncMember *leftmember = osync_group_nth_member(group, 0);
+ OSyncMember *rightmember = osync_group_nth_member(group, 1);
+
+ OSyncFilter *filter1 = osync_filter_add(group, leftmember, rightmember, NULL, NULL, NULL, OSYNC_FILTER_DENY);
+ OSyncFilter *filter2 = osync_filter_add(group, leftmember, rightmember, NULL, NULL, NULL, OSYNC_FILTER_DENY);
+ fail_unless(filter1 != NULL, NULL);
+ fail_unless(filter2 != NULL, NULL);
+
+ mark_point();
+ fail_unless(osync_group_num_filters(group) == 2, NULL);
+ fail_unless(osync_group_nth_filter(group, 0) == filter1, NULL);
+ fail_unless(osync_group_nth_filter(group, 1) == filter2, NULL);
+
+ mark_point();
+ osync_group_flush_filters(group);
+ fail_unless(osync_group_num_filters(group) == 0, NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (filter_sync_deny_all)
+{
+ OSyncError *error = NULL;
+ char *testbed = setup_testbed("filter_sync_deny_all");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ mark_point();
+
+ /* add filter and save the group */
+ OSyncMember *leftmember = osync_group_nth_member(group, 0);
+
+ osync_filter_add(group, leftmember, NULL, NULL, NULL, NULL, OSYNC_FILTER_DENY);
+ osync_filter_add(group, NULL, leftmember, NULL, NULL, NULL, OSYNC_FILTER_DENY);
+
+ fail_unless(osync_group_save(group, &error), NULL);
+
+ fail_unless(osync_env_finalize(osync, NULL), NULL);
+ osync_env_free(osync);
+
+ /* ... unload and load the group again ... to parse the filter config (also for the members) .. */
+ osync = init_env();
+
+ mark_point();
+
+ group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+
+ /* do the evil sync stuff.. */
+ mark_point();
+ OSyncEngine *engine = osengine_new(group, &error);
+
+ mark_point();
+ fail_unless(engine != NULL, NULL);
+ fail_unless(osengine_init(engine, &error), NULL);
+ fail_unless(osync_group_num_filters(group) == 2, NULL);
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"xtestdata\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"xtestdata2\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (filter_sync_custom)
+{
+ char *testbed = setup_testbed("filter_sync_custom");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ mark_point();
+
+ OSyncFilter *filter = osync_filter_add_custom(group, NULL, NULL, NULL, NULL, "contact", "vcard_categories_filter");
+ osync_filter_set_config(filter, "test");
+
+ mark_point();
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ mark_point();
+ fail_unless(engine != NULL, NULL);
+ fail_unless(osengine_init(engine, &error), NULL);
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+static OSyncFilterAction vcard_cats(OSyncChange *change, char *config)
+{
+ //Check what categories are supported here.
+ return OSYNC_FILTER_IGNORE;
+}
+
+START_TEST (filter_save_and_load)
+{
+ char *testbed = setup_testbed("filter_save_and_load");
+ OSyncEnv *osync = init_env();
+ osync_env_register_objtype(osync, "test");
+ osync_env_register_objformat(osync, "test", "format1");
+ osync_env_register_filter_function(osync, "vcard_cats", "test", "format1", vcard_cats);
+
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ mark_point();
+
+ OSyncMember *leftmember = osync_group_nth_member(group, 0);
+ OSyncMember *rightmember = osync_group_nth_member(group, 1);
+
+ OSyncFilter *filter1 = osync_filter_add(group, leftmember, rightmember, "1", "2", "3", OSYNC_FILTER_DENY);
+ OSyncFilter *filter2 = osync_filter_add(group, rightmember, leftmember, "4", "5", "6", OSYNC_FILTER_ALLOW);
+ OSyncFilter *filter3 = osync_filter_add_custom(group, leftmember, rightmember, "7", "8", "9", "vcard_cats");
+ osync_filter_set_config(filter3, "test");
+
+ fail_unless(osync_group_num_filters(group) == 3, NULL);
+ fail_unless(osync_group_nth_filter(group, 0) == filter1, NULL);
+ fail_unless(osync_group_nth_filter(group, 1) == filter2, NULL);
+ fail_unless(osync_group_nth_filter(group, 2) == filter3, NULL);
+
+ mark_point();
+ osync_group_save(group, NULL);
+ mark_point();
+ osync_env_finalize(osync, NULL);
+ osync_env_free(osync);
+ osync = init_env();
+ osync_env_register_objtype(osync, "test");
+ osync_env_register_objformat(osync, "test", "format1");
+ osync_env_register_filter_function(osync, "vcard_cats", "test", "format1", vcard_cats);
+ group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ mark_point();
+
+ fail_unless(osync_group_num_filters(group) == 3, NULL);
+ filter1 = osync_group_nth_filter(group, 0);
+ fail_unless(filter1 != NULL, NULL);
+ fail_unless(filter1->sourcememberid == 1, NULL);
+ fail_unless(filter1->destmemberid == 2, NULL);
+ fail_unless(!strcmp(filter1->sourceobjtype, "1"), NULL);
+ fail_unless(!strcmp(filter1->destobjtype, "2"), NULL);
+ fail_unless(!strcmp(filter1->detectobjtype, "3"), NULL);
+ fail_unless(filter1->action == OSYNC_FILTER_DENY, NULL);
+
+ filter1 = osync_group_nth_filter(group, 1);
+ fail_unless(filter1 != NULL, NULL);
+ fail_unless(filter1->sourcememberid == 2, NULL);
+ fail_unless(filter1->destmemberid == 1, NULL);
+ fail_unless(!strcmp(filter1->sourceobjtype, "4"), NULL);
+ fail_unless(!strcmp(filter1->destobjtype, "5"), NULL);
+ fail_unless(!strcmp(filter1->detectobjtype, "6"), NULL);
+ fail_unless(filter1->action == OSYNC_FILTER_ALLOW, NULL);
+
+ filter1 = osync_group_nth_filter(group, 2);
+ fail_unless(filter1 != NULL, NULL);
+ fail_unless(filter1->sourcememberid == 1, NULL);
+ fail_unless(filter1->destmemberid == 2, NULL);
+ fail_unless(!strcmp(filter1->sourceobjtype, "7"), NULL);
+ fail_unless(!strcmp(filter1->destobjtype, "8"), NULL);
+ fail_unless(!strcmp(filter1->detectobjtype, "9"), NULL);
+ fail_unless(filter1->hook != NULL, NULL);
+ fail_unless(!strcmp(osync_filter_get_config(filter1), "test"), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (filter_sync_vcard_only)
+{
+ char *testbed = setup_testbed("filter_sync_vcard_only");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ mark_point();
+
+ OSyncMember *rightmember = osync_group_nth_member(group, 1);
+
+ osync_filter_add(group, NULL, rightmember, NULL, NULL, NULL, OSYNC_FILTER_DENY);
+ osync_filter_add(group, NULL, rightmember, NULL, NULL, "contact", OSYNC_FILTER_ALLOW);
+
+ mark_point();
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ mark_point();
+ fail_unless(engine != NULL, NULL);
+ fail_unless(osengine_init(engine, &error), NULL);
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+ osync_env_finalize(osync, NULL);
+ osync_env_free(osync);
+
+ fail_unless(!system("test \"x$(ls data1/testdata)\" = \"xdata1/testdata\""), NULL);
+ fail_unless(!system("test \"x$(ls data1/testdata2)\" = \"xdata1/testdata2\""), NULL);
+ fail_unless(!system("test \"x$(ls data1/testdata3)\" = \"xdata1/testdata3\""), NULL);
+ fail_unless(!system("test \"x$(ls data1/vcard.vcf)\" = \"xdata1/vcard.vcf\""), NULL);
+
+ fail_unless(!system("test \"x$(ls data2/testdata3)\" = \"xdata2/testdata3\""), NULL);
+ fail_unless(!system("test \"x$(ls data2/vcard.vcf)\" = \"xdata2/vcard.vcf\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST(filter_destobjtype_delete)
+{
+ /* Check if the destobjtype of the changes is being
+ * set when the change type os DELETE */
+ char *testbed = setup_testbed("destobjtype_delete");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ mark_point();
+
+ mark_point();
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ mark_point();
+ fail_unless(engine != NULL, NULL);
+ fail_unless(osengine_init(engine, &error), NULL);
+ synchronize_once(engine, NULL);
+ mark_point();
+
+ /* Synchronize once, delete a file, and synchronize again */
+
+ fail_unless(!system("rm data1/file"), NULL);
+
+ synchronize_once(engine, NULL);
+ mark_point();
+ osengine_finalize(engine);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+/*int num_read;
+
+START_TEST (filter_sync_read_only)
+{
+ char *testbed = setup_testbed("filter_sync_deny_all");
+ OSyncEnv *osync = osync_env_new();
+ osync_env_initialize(osync, NULL);
+ mark_point();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ mark_point();
+
+ OSyncMember *leftmember = osync_group_nth_member(group, 0);
+
+ osync_member_set_read_only(leftmember, "data", TRUE);
+
+ num_read = 0;
+ mark_point();
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ mark_point();
+ fail_unless(engine != NULL, NULL);
+ fail_unless(osengine_init(engine, &error), NULL);
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ fail_unless(num_read == 1);
+
+ fail_unless(!system("test \"x$(ls data1/testdata)\" = \"xdata1/testdata\""), NULL);
+ fail_unless(!system("test \"x$(ls data1/testdata2)\" = \"xdata1/testdata2\""), NULL);
+ fail_unless(!system("test \"x$(ls data2/testdata2)\" = \"xdata2/testdata2\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST*/
+
+Suite *filter_suite(void)
+{
+ Suite *s = suite_create("Filter");
+ //Suite *s2 = suite_create("Filter");
+
+ create_case(s, "filter_setup", filter_setup);
+ create_case(s, "filter_flush", filter_flush);
+ create_case(s, "filter_sync_deny_all", filter_sync_deny_all);
+ create_case(s, "filter_sync_custom", filter_sync_custom);
+ create_case(s, "filter_save_and_load", filter_save_and_load);
+ create_case(s, "filter_sync_vcard_only", filter_sync_vcard_only);
+ create_case(s, "filter_destobjtype_delete", filter_destobjtype_delete);
+
+ return s;
+}
+
+int main(void)
+{
+ int nf;
+
+ Suite *s = filter_suite();
+
+ SRunner *sr;
+ sr = srunner_create(s);
+
+// srunner_set_fork_status (sr, CK_NOFORK);
+ srunner_run_all(sr, CK_NORMAL);
+ nf = srunner_ntests_failed(sr);
+ srunner_free(sr);
+ return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/debian/opensync/opensync-0.22/tests/check_group.c b/debian/opensync/opensync-0.22/tests/check_group.c
new file mode 100644
index 00000000..91d84773
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/check_group.c
@@ -0,0 +1,62 @@
+#include "support.h"
+
+START_TEST (group_last_sync)
+{
+ char *testbed = setup_testbed("filter_save_and_load");
+
+ OSyncEnv *env = init_env();
+ OSyncGroup *group = osync_group_load(env, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(env) == 1, NULL);
+ mark_point();
+
+ osync_group_set_last_synchronization(group, (time_t)1000);
+
+ fail_unless((int)osync_group_get_last_synchronization(group) == 1000, NULL);
+
+ OSyncError *error = NULL;
+ fail_unless(osync_group_save(group, &error), NULL);
+
+ fail_unless(osync_env_finalize(env, NULL), NULL);
+ osync_env_free(env);
+
+ env = init_env();
+ group = osync_group_load(env, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(env) == 1, NULL);
+ mark_point();
+
+ fail_unless((int)osync_group_get_last_synchronization(group) == 1000, NULL);
+
+ fail_unless(osync_env_finalize(env, NULL), NULL);
+ osync_env_free(env);
+ destroy_testbed(testbed);
+}
+END_TEST
+
+Suite *group_suite(void)
+{
+ Suite *s = suite_create("Group");
+ TCase *tc_core = tcase_create("Core");
+
+ suite_add_tcase (s, tc_core);
+ tcase_add_test(tc_core, group_last_sync);
+
+ return s;
+}
+
+int main(void)
+{
+ int nf;
+
+ Suite *s = group_suite();
+
+ SRunner *sr;
+ sr = srunner_create(s);
+
+// srunner_set_fork_status (sr, CK_NOFORK);
+ srunner_run_all(sr, CK_NORMAL);
+ nf = srunner_ntests_failed(sr);
+ srunner_free(sr);
+ return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/debian/opensync/opensync-0.22/tests/check_ipc.c b/debian/opensync/opensync-0.22/tests/check_ipc.c
new file mode 100644
index 00000000..5cde12ae
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/check_ipc.c
@@ -0,0 +1,2093 @@
+#include "support.h"
+#include <sys/wait.h>
+
+void _remove_pipe(const char *name)
+{
+ char *cmd = g_strdup_printf("rm %s &> /dev/null", name);
+ system(cmd);
+ g_free(cmd);
+}
+
+START_TEST (ipc_new)
+{
+ char *testbed = setup_testbed(NULL);
+ _remove_pipe("/tmp/testpipe");
+
+ OSyncError *error = NULL;
+ OSyncQueue *queue1 = osync_queue_new("/tmp/testpipe", &error);
+ fail_unless(queue1 != NULL, NULL);
+ fail_unless(error == NULL, NULL);
+
+ osync_queue_free(queue1);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (ipc_create)
+{
+ char *testbed = setup_testbed(NULL);
+ _remove_pipe("/tmp/testpipe");
+
+ OSyncError *error = NULL;
+ OSyncQueue *queue1 = osync_queue_new("/tmp/testpipe", &error);
+ fail_unless(queue1 != NULL, NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_create(queue1, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(system("ls /tmp/testpipe &> /dev/null") == 0, NULL);
+
+ fail_unless(osync_queue_remove(queue1, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(system("ls /tmp/testpipe &> /dev/null") != 0, NULL);
+
+ osync_queue_free(queue1);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (ipc_connect)
+{
+ char *testbed = setup_testbed(NULL);
+ _remove_pipe("/tmp/testpipe");
+
+ OSyncError *error = NULL;
+ OSyncQueue *queue = osync_queue_new("/tmp/testpipe", &error);
+
+ osync_queue_create(queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ pid_t cpid = fork();
+ if (cpid == 0) { //Child
+ fail_unless(osync_queue_connect(queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ if (osync_queue_disconnect(queue, &error) != TRUE || error != NULL)
+ exit(1);
+
+ osync_queue_free(queue);
+
+ g_free(testbed);
+ exit(0);
+ } else {
+ fail_unless(osync_queue_connect(queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ osync_queue_disconnect(queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ int status = 0;
+ wait(&status);
+ fail_unless(WEXITSTATUS(status) == 0, NULL);
+
+ }
+
+ fail_unless(system("ls /tmp/testpipe &> /dev/null") == 0, NULL);
+
+ fail_unless(osync_queue_remove(queue, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(system("ls /tmp/testpipe &> /dev/null") != 0, NULL);
+
+ osync_queue_free(queue);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (ipc_payload)
+{
+ char *testbed = setup_testbed(NULL);
+ _remove_pipe("/tmp/testpipe-server");
+ _remove_pipe("/tmp/testpipe-client");
+
+ OSyncError *error = NULL;
+ OSyncQueue *server_queue = osync_queue_new("/tmp/testpipe-server", &error);
+ OSyncQueue *client_queue = osync_queue_new("/tmp/testpipe-client", &error);
+ OSyncMessage *message = NULL;
+
+ osync_queue_create(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ osync_queue_create(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+ char *data = "this is another test string";
+
+ pid_t cpid = fork();
+ if (cpid == 0) { //Child
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ message = osync_queue_get_message(client_queue);
+
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_INITIALIZE) {
+ exit (1);
+ }
+
+ int int1;
+ long long int longint1;
+ char *string;
+ void *databuf;
+
+ osync_message_read_int(message, &int1);
+ osync_message_read_const_string(message, &string);
+ osync_message_read_long_long_int(message, &longint1);
+ osync_message_read_const_data(message, &databuf, strlen(data) + 1);
+
+ fail_unless(int1 == 4000000, NULL);
+ fail_unless(!strcmp(string, "this is a test string"), NULL);
+ fail_unless(longint1 == 400000000, NULL);
+ fail_unless(!strcmp(databuf, "this is another test string"), NULL);
+
+ OSyncMessage *reply = osync_message_new_reply(message, &error);
+
+ osync_message_unref(message);
+
+ if (osync_queue_disconnect(client_queue, &error) != TRUE || error != NULL)
+ exit(1);
+ osync_queue_free(client_queue);
+
+ osync_queue_send_message(server_queue, NULL, reply, &error);
+ osync_message_unref(reply);
+
+ message = osync_queue_get_message(server_queue);
+
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_QUEUE_HUP) {
+ exit (1);
+ }
+
+ osync_message_unref(message);
+
+ if (osync_queue_disconnect(server_queue, &error) != TRUE || error != NULL)
+ exit(1);
+ osync_queue_free(server_queue);
+
+ g_free(testbed);
+
+ exit(0);
+ } else {
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ message = osync_message_new(OSYNC_MESSAGE_INITIALIZE, 0, &error);
+ fail_unless(message != NULL, NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_write_int(message, 4000000);
+ osync_message_write_string(message, "this is a test string");
+ osync_message_write_long_long_int(message, 400000000);
+ osync_message_write_data(message, data, strlen(data) + 1);
+
+ fail_unless(osync_queue_send_message(client_queue, NULL, message, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_unref(message);
+
+ while (!(message = osync_queue_get_message(server_queue))) {
+ usleep(100000);
+ }
+
+ fail_unless(osync_message_get_command(message) == OSYNC_MESSAGE_REPLY);
+
+ osync_message_unref(message);
+
+ osync_queue_disconnect(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ while (!(message = osync_queue_get_message(client_queue))) {
+ usleep(10000);
+ }
+
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_QUEUE_HUP) {
+ exit (1);
+ }
+
+ osync_message_unref(message);
+
+ osync_queue_disconnect(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ int status = 0;
+ wait(&status);
+ fail_unless(WEXITSTATUS(status) == 0, NULL);
+ }
+
+ fail_unless(system("ls /tmp/testpipe-client &> /dev/null") == 0, NULL);
+
+ fail_unless(osync_queue_remove(client_queue, &error), NULL);
+ fail_unless(osync_queue_remove(server_queue, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ fail_unless(system("ls /tmp/testpipe-client &> /dev/null") != 0, NULL);
+
+ osync_queue_free(client_queue);
+ osync_queue_free(server_queue);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (ipc_payload_wait)
+{
+ char *testbed = setup_testbed(NULL);
+ _remove_pipe("/tmp/testpipe-server");
+ _remove_pipe("/tmp/testpipe-client");
+
+ OSyncError *error = NULL;
+ OSyncQueue *server_queue = osync_queue_new("/tmp/testpipe-server", &error);
+ OSyncQueue *client_queue = osync_queue_new("/tmp/testpipe-client", &error);
+ OSyncMessage *message = NULL;
+
+ osync_queue_create(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ osync_queue_create(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+ char *data = "this is another test string";
+
+ pid_t cpid = fork();
+ if (cpid == 0) { //Child
+ sleep(1);
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ while (!(message = osync_queue_get_message(client_queue))) {
+ usleep(10000);
+ }
+
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_INITIALIZE) {
+ exit (1);
+ }
+
+ int int1;
+ long long int longint1;
+ char *string;
+ char databuf[strlen(data) + 1];
+
+ osync_message_read_int(message, &int1);
+ osync_message_read_string(message, &string);
+ osync_message_read_long_long_int(message, &longint1);
+ osync_message_read_data(message, databuf, strlen(data) + 1);
+
+ fail_unless(int1 == 4000000, NULL);
+ fail_unless(!strcmp(string, "this is a test string"), NULL);
+ fail_unless(longint1 == 400000000, NULL);
+ fail_unless(!strcmp(databuf, "this is another test string"), NULL);
+
+ sleep(1);
+
+ OSyncMessage *reply = osync_message_new_reply(message, &error);
+
+ osync_message_unref(message);
+
+ osync_queue_send_message(server_queue, NULL, reply, &error);
+
+ osync_message_unref(reply);
+
+ sleep(1);
+
+ if (osync_queue_disconnect(client_queue, &error) != TRUE || error != NULL)
+ exit(1);
+ osync_queue_free(client_queue);
+
+ while (!(message = osync_queue_get_message(server_queue))) {
+ usleep(10000);
+ }
+
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_QUEUE_HUP) {
+ exit (1);
+ }
+
+ osync_message_unref(message);
+ sleep(1);
+
+ if (osync_queue_disconnect(server_queue, &error) != TRUE || error != NULL)
+ exit(1);
+ osync_queue_free(server_queue);
+
+ g_free(testbed);
+
+ exit(0);
+ } else {
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ message = osync_message_new(OSYNC_MESSAGE_INITIALIZE, 0, &error);
+ fail_unless(message != NULL, NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_write_int(message, 4000000);
+ osync_message_write_string(message, "this is a test string");
+ osync_message_write_long_long_int(message, 400000000);
+ osync_message_write_data(message, data, strlen(data) + 1);
+
+ fail_unless(osync_queue_send_message(client_queue, NULL, message, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_unref(message);
+
+ while (!(message = osync_queue_get_message(server_queue))) {
+ usleep(100000);
+ }
+
+ fail_unless(osync_message_get_command(message) == OSYNC_MESSAGE_REPLY);
+
+ osync_message_unref(message);
+
+ osync_queue_disconnect(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ while (!(message = osync_queue_get_message(client_queue))) {
+ usleep(10000);
+ }
+
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_QUEUE_HUP) {
+ exit (1);
+ }
+ osync_message_unref(message);
+
+ osync_queue_disconnect(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ int status = 0;
+ wait(&status);
+ fail_unless(WEXITSTATUS(status) == 0, NULL);
+ }
+
+ fail_unless(system("ls /tmp/testpipe-client &> /dev/null") == 0, NULL);
+
+ fail_unless(osync_queue_remove(client_queue, &error), NULL);
+ fail_unless(osync_queue_remove(server_queue, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ fail_unless(system("ls /tmp/testpipe-client &> /dev/null") != 0, NULL);
+
+ osync_queue_free(client_queue);
+ osync_queue_free(server_queue);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (ipc_payload_stress)
+{
+ char *testbed = setup_testbed(NULL);
+ _remove_pipe("/tmp/testpipe-server");
+ _remove_pipe("/tmp/testpipe-client");
+
+ int num_mess = 1000;
+ int size = 100;
+
+ char *data = malloc(size);
+ memset(data, 42, size);
+
+ OSyncError *error = NULL;
+ OSyncQueue *server_queue = osync_queue_new("/tmp/testpipe-server", &error);
+ OSyncQueue *client_queue = osync_queue_new("/tmp/testpipe-client", &error);
+ OSyncMessage *message = NULL;
+
+ osync_queue_create(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ osync_queue_create(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ pid_t cpid = fork();
+ if (cpid == 0) { //Child
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ while (num_mess > 0) {
+ osync_trace(TRACE_INTERNAL, "Waiting for message");
+ message = osync_queue_get_message(client_queue);
+
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_INITIALIZE) {
+ exit (1);
+ }
+
+ osync_trace(TRACE_INTERNAL, "Parsing message");
+ char databuf[size];
+
+ osync_message_read_data(message, databuf, size);
+
+ fail_unless(!memcmp(databuf, data, size), NULL);
+
+ osync_trace(TRACE_INTERNAL, "Creating new reply");
+ OSyncMessage *reply = osync_message_new_reply(message, &error);
+
+ osync_message_unref(message);
+
+ osync_trace(TRACE_INTERNAL, "Sending reply");
+ osync_queue_send_message(server_queue, NULL, reply, &error);
+
+ osync_message_unref(reply);
+
+ num_mess--;
+ }
+
+ if (osync_queue_disconnect(client_queue, &error) != TRUE || error != NULL)
+ exit(1);
+ osync_queue_free(client_queue);
+
+ message = osync_queue_get_message(server_queue);
+
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_QUEUE_HUP) {
+ exit (1);
+ }
+
+ osync_message_unref(message);
+
+ if (osync_queue_disconnect(server_queue, &error) != TRUE || error != NULL)
+ exit(1);
+ osync_queue_free(server_queue);
+
+ g_free(data);
+ g_free(testbed);
+
+ exit(0);
+ } else {
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ while (num_mess > 0) {
+ osync_trace(TRACE_INTERNAL, "Creating new message");
+ message = osync_message_new(OSYNC_MESSAGE_INITIALIZE, 0, &error);
+ fail_unless(message != NULL, NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_write_data(message, data, size);
+
+ osync_trace(TRACE_INTERNAL, "Sending message");
+ fail_unless(osync_queue_send_message(client_queue, NULL, message, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_unref(message);
+
+ osync_trace(TRACE_INTERNAL, "Waiting for message");
+ message = osync_queue_get_message(server_queue);
+
+ fail_unless(osync_message_get_command(message) == OSYNC_MESSAGE_REPLY);
+
+ osync_message_unref(message);
+
+ num_mess--;
+ }
+
+ osync_queue_disconnect(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ message = osync_queue_get_message(client_queue);
+
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_QUEUE_HUP) {
+ exit (1);
+ }
+
+ osync_message_unref(message);
+
+ osync_queue_disconnect(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ int status = 0;
+ wait(&status);
+ fail_unless(WEXITSTATUS(status) == 0, NULL);
+ }
+
+ fail_unless(system("ls /tmp/testpipe-client &> /dev/null") == 0, NULL);
+
+ fail_unless(osync_queue_remove(client_queue, &error), NULL);
+ fail_unless(osync_queue_remove(server_queue, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ fail_unless(system("ls /tmp/testpipe-client &> /dev/null") != 0, NULL);
+
+ osync_queue_free(client_queue);
+ osync_queue_free(server_queue);
+
+ g_free(data);
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (ipc_payload_stress2)
+{
+ char *testbed = setup_testbed(NULL);
+ _remove_pipe("/tmp/testpipe-server");
+ _remove_pipe("/tmp/testpipe-client");
+ int i = 0;
+
+ int num_mess = 1000;
+ int size = 100;
+
+ char *data = malloc(size);
+ memset(data, 42, size);
+
+ OSyncError *error = NULL;
+ OSyncQueue *server_queue = osync_queue_new("/tmp/testpipe-server", &error);
+ OSyncQueue *client_queue = osync_queue_new("/tmp/testpipe-client", &error);
+ OSyncMessage *message = NULL;
+
+ osync_queue_create(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ osync_queue_create(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ pid_t cpid = fork();
+ if (cpid == 0) { //Child
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ for (i = 0; i < num_mess; i++) {
+ message = osync_queue_get_message(client_queue);
+
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_INITIALIZE) {
+ exit (1);
+ }
+
+ char databuf[size];
+
+ osync_message_read_data(message, databuf, size);
+
+ fail_unless(!memcmp(databuf, data, size), NULL);
+
+ osync_message_unref(message);
+ }
+
+ message = osync_message_new(OSYNC_MESSAGE_INITIALIZE, 0, &error);
+
+ for (i = 0; i < num_mess; i++) {
+ OSyncMessage *reply = osync_message_new_reply(message, &error);
+
+ osync_queue_send_message(server_queue, NULL, reply, &error);
+
+ osync_message_unref(reply);
+ }
+
+ osync_message_unref(message);
+
+ if (osync_queue_disconnect(client_queue, &error) != TRUE || error != NULL)
+ exit(1);
+ osync_queue_free(client_queue);
+
+ message = osync_queue_get_message(server_queue);
+
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_QUEUE_HUP) {
+ exit (1);
+ }
+
+ osync_message_unref(message);
+
+ if (osync_queue_disconnect(server_queue, &error) != TRUE || error != NULL)
+ exit(1);
+ osync_queue_free(server_queue);
+
+ g_free(data);
+ g_free(testbed);
+
+ exit(0);
+ } else {
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ for (i = 0; i < num_mess; i++) {
+ message = osync_message_new(OSYNC_MESSAGE_INITIALIZE, 0, &error);
+ fail_unless(message != NULL, NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_write_data(message, data, size);
+
+ fail_unless(osync_queue_send_message(client_queue, NULL, message, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_unref(message);
+ }
+
+ for (i = 0; i < num_mess; i++) {
+ message = osync_queue_get_message(server_queue);
+
+ fail_unless(osync_message_get_command(message) == OSYNC_MESSAGE_REPLY);
+
+ osync_message_unref(message);
+ }
+
+ osync_queue_disconnect(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ message = osync_queue_get_message(client_queue);
+
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_QUEUE_HUP) {
+ exit (1);
+ }
+
+ osync_message_unref(message);
+
+ osync_queue_disconnect(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ int status = 0;
+ wait(&status);
+ fail_unless(WEXITSTATUS(status) == 0, NULL);
+ }
+
+ fail_unless(system("ls /tmp/testpipe-client &> /dev/null") == 0, NULL);
+
+ fail_unless(osync_queue_remove(client_queue, &error), NULL);
+ fail_unless(osync_queue_remove(server_queue, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ fail_unless(system("ls /tmp/testpipe-client &> /dev/null") != 0, NULL);
+
+ osync_queue_free(client_queue);
+ osync_queue_free(server_queue);
+
+ g_free(data);
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (ipc_large_payload)
+{
+ char *testbed = setup_testbed(NULL);
+ _remove_pipe("/tmp/testpipe-server");
+ _remove_pipe("/tmp/testpipe-client");
+ int i = 0;
+
+ int num_mess = 10;
+ int size = 1024 * 1024 * 20; //20mbyte
+
+ char *data = malloc(size);
+ memset(data, 42, size);
+
+ OSyncError *error = NULL;
+ OSyncQueue *server_queue = osync_queue_new("/tmp/testpipe-server", &error);
+ OSyncQueue *client_queue = osync_queue_new("/tmp/testpipe-client", &error);
+ OSyncMessage *message = NULL;
+
+ osync_queue_create(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ osync_queue_create(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ pid_t cpid = fork();
+ if (cpid == 0) { //Child
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ for (i = 0; i < num_mess; i++) {
+ message = osync_queue_get_message(client_queue);
+
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_INITIALIZE) {
+ exit (1);
+ }
+
+ void *databuf = NULL;
+ osync_message_read_const_data(message, &databuf, size);
+
+ if (memcmp(databuf, data, size))
+ exit(1);
+
+ OSyncMessage *reply = osync_message_new_reply(message, &error);
+
+ osync_message_unref(message);
+
+ osync_queue_send_message(server_queue, NULL, reply, &error);
+
+ osync_message_unref(reply);
+ }
+
+ if (osync_queue_disconnect(client_queue, &error) != TRUE || error != NULL)
+ exit(1);
+ osync_queue_free(client_queue);
+
+ message = osync_queue_get_message(server_queue);
+
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_QUEUE_HUP) {
+ exit (1);
+ }
+
+ osync_message_unref(message);
+
+ if (osync_queue_disconnect(server_queue, &error) != TRUE || error != NULL)
+ exit(1);
+ osync_queue_free(server_queue);
+
+ g_free(data);
+
+ g_free(testbed);
+
+ exit(0);
+ } else {
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ for (i = 0; i < num_mess; i++) {
+ message = osync_message_new(OSYNC_MESSAGE_INITIALIZE, 0, &error);
+ fail_unless(message != NULL, NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_write_data(message, data, size);
+
+ fail_unless(osync_queue_send_message(client_queue, NULL, message, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_unref(message);
+
+ message = osync_queue_get_message(server_queue);
+
+ fail_unless(osync_message_get_command(message) == OSYNC_MESSAGE_REPLY);
+
+ osync_message_unref(message);
+ }
+
+ osync_queue_disconnect(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ message = osync_queue_get_message(client_queue);
+
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_QUEUE_HUP) {
+ exit (1);
+ }
+
+ osync_message_unref(message);
+
+ osync_queue_disconnect(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ int status = 0;
+ wait(&status);
+ fail_unless(WEXITSTATUS(status) == 0, NULL);
+ }
+
+ fail_unless(system("ls /tmp/testpipe-client &> /dev/null") == 0, NULL);
+
+ fail_unless(osync_queue_remove(client_queue, &error), NULL);
+ fail_unless(osync_queue_remove(server_queue, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ fail_unless(system("ls /tmp/testpipe-client &> /dev/null") != 0, NULL);
+
+ osync_queue_free(client_queue);
+ osync_queue_free(server_queue);
+
+ g_free(data);
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (ipc_error_no_pipe)
+{
+ char *testbed = setup_testbed(NULL);
+ _remove_pipe("/tmp/testpipe");
+
+ OSyncError *error = NULL;
+ OSyncQueue *queue1 = osync_queue_new("/tmp/testpipe", &error);
+ fail_unless(queue1 != NULL, NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(!osync_queue_connect(queue1, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error != NULL, NULL);
+ osync_error_free(&error);
+
+ osync_queue_free(queue1);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (ipc_error_perm)
+{
+ char *testbed = setup_testbed(NULL);
+ _remove_pipe("/tmp/testpipe");
+
+ OSyncError *error = NULL;
+ OSyncQueue *queue = osync_queue_new("/tmp/testpipe", &error);
+
+ osync_queue_create(queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ if (system("chmod 000 /tmp/testpipe"))
+ abort();
+
+ fail_unless(!osync_queue_connect(queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error != NULL, NULL);
+ osync_error_free(&error);
+
+ fail_unless(system("ls /tmp/testpipe &> /dev/null") == 0, NULL);
+
+ fail_unless(osync_queue_remove(queue, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(system("ls /tmp/testpipe &> /dev/null") != 0, NULL);
+
+ osync_queue_free(queue);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (ipc_error_rem)
+{
+ char *testbed = setup_testbed(NULL);
+ _remove_pipe("/tmp/testpipe");
+
+ OSyncError *error = NULL;
+ OSyncQueue *server_queue = osync_queue_new("/tmp/testpipe", &error);
+ OSyncMessage *message = NULL;
+
+ osync_queue_create(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ pid_t cpid = fork();
+ if (cpid == 0) { //Child
+ osync_assert(osync_queue_connect(server_queue, OSYNC_QUEUE_RECEIVER, &error));
+ osync_assert(error == NULL);
+
+ g_free(testbed);
+ exit(0);
+ } else {
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ message = osync_queue_get_message(server_queue);
+ osync_assert(osync_message_get_command(message) == OSYNC_MESSAGE_QUEUE_HUP);
+ osync_message_unref(message);
+
+ osync_queue_disconnect(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ int status = 0;
+ wait(&status);
+ fail_unless(WEXITSTATUS(status) == 0, NULL);
+ }
+
+ fail_unless(system("ls /tmp/testpipe &> /dev/null") == 0, NULL);
+
+ fail_unless(osync_queue_remove(server_queue, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ fail_unless(system("ls /tmp/testpipe &> /dev/null") != 0, NULL);
+
+ osync_queue_free(server_queue);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (ipc_error_rem2)
+{
+ char *testbed = setup_testbed(NULL);
+ _remove_pipe("/tmp/testpipe");
+
+ OSyncError *error = NULL;
+ OSyncQueue *server_queue = osync_queue_new("/tmp/testpipe", &error);
+ OSyncMessage *message = NULL;
+
+ osync_queue_create(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ pid_t cpid = fork();
+ if (cpid == 0) { //Child
+ osync_assert(osync_queue_connect(server_queue, OSYNC_QUEUE_SENDER, &error));
+ osync_assert(error == NULL);
+
+ osync_assert(_osync_queue_write_int(server_queue, 10000, &error));
+ osync_assert(error == NULL);
+
+ osync_assert(_osync_queue_write_int(server_queue, 0, &error));
+ osync_assert(error == NULL);
+
+ osync_assert(_osync_queue_write_long_long_int(server_queue, 0, &error));
+ osync_assert(error == NULL);
+
+ osync_assert(_osync_queue_write_int(server_queue, 0, &error));
+ osync_assert(error == NULL);
+
+ sleep(1);
+
+ osync_queue_disconnect(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ osync_queue_free(server_queue);
+
+ g_free(testbed);
+ exit(0);
+ } else {
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ message = osync_queue_get_message(server_queue);
+ osync_assert(osync_message_get_command(message) == OSYNC_MESSAGE_QUEUE_ERROR);
+ osync_message_unref(message);
+
+ osync_queue_disconnect(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ int status = 0;
+ wait(&status);
+ fail_unless(WEXITSTATUS(status) == 0, NULL);
+ }
+
+ fail_unless(system("ls /tmp/testpipe &> /dev/null") == 0, NULL);
+
+ fail_unless(osync_queue_remove(server_queue, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ fail_unless(system("ls /tmp/testpipe &> /dev/null") != 0, NULL);
+
+ osync_queue_free(server_queue);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+OSyncQueue *server_queue = NULL;
+OSyncQueue *client_queue = NULL;
+
+void server_handler1(OSyncMessage *message, void *user_data)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, message, user_data);
+ OSyncError *error = NULL;
+
+ osync_assert(GPOINTER_TO_INT(user_data) ==1);
+
+ fail_unless(osync_message_get_command(message) == OSYNC_MESSAGE_INITIALIZE);
+
+ osync_queue_disconnect(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+void client_handler1(OSyncMessage *message, void *user_data)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, message, user_data);
+ OSyncError *error = NULL;
+
+ osync_assert(GPOINTER_TO_INT(user_data) ==1);
+ osync_assert(osync_message_get_command(message) == OSYNC_MESSAGE_INITIALIZE);
+
+ int int1;
+ long long int longint1;
+ char *string;
+ void *databuf;
+
+ osync_message_read_int(message, &int1);
+ osync_message_read_const_string(message, &string);
+ osync_message_read_long_long_int(message, &longint1);
+ osync_message_read_const_data(message, &databuf, strlen("this is another test string") + 1);
+
+ fail_unless(int1 == 4000000, NULL);
+ fail_unless(!strcmp(string, "this is a test string"), NULL);
+ fail_unless(longint1 == 400000000, NULL);
+ fail_unless(!strcmp(databuf, "this is another test string"), NULL);
+
+ OSyncMessage *reply = osync_message_new(OSYNC_MESSAGE_INITIALIZE, 0, &error);
+
+ osync_queue_send_message(server_queue, NULL, reply, &error);
+
+ osync_message_unref(reply);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+START_TEST (ipc_loop_payload)
+{
+ char *testbed = setup_testbed(NULL);
+ _remove_pipe("/tmp/testpipe-server");
+ _remove_pipe("/tmp/testpipe-client");
+
+ OSyncError *error = NULL;
+ server_queue = osync_queue_new("/tmp/testpipe-server", &error);
+ client_queue = osync_queue_new("/tmp/testpipe-client", &error);
+ OSyncMessage *message = NULL;
+
+ osync_queue_create(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ osync_queue_create(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+ char *data = "this is another test string";
+
+ GMainContext *context = g_main_context_new();
+ OSyncThread *thread = osync_thread_new(context, &error);
+
+ pid_t cpid = fork();
+ if (cpid == 0) { //Child
+ osync_queue_set_message_handler(client_queue, client_handler1, GINT_TO_POINTER(1));
+
+ osync_queue_setup_with_gmainloop(client_queue, context);
+
+ osync_thread_start(thread);
+
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ message = osync_queue_get_message(server_queue);
+
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_QUEUE_HUP) {
+ exit (1);
+ }
+
+ osync_message_unref(message);
+
+ if (osync_queue_disconnect(server_queue, &error) != TRUE || error != NULL)
+ exit(1);
+ osync_queue_free(server_queue);
+
+ osync_assert(osync_queue_disconnect(client_queue, &error));
+ osync_assert(error == NULL);
+
+ osync_thread_stop(thread);
+ osync_thread_free(thread);
+
+ osync_queue_free(client_queue);
+
+ g_free(testbed);
+
+ exit(0);
+ } else {
+ osync_queue_set_message_handler(server_queue, server_handler1, GINT_TO_POINTER(1));
+
+ osync_queue_setup_with_gmainloop(server_queue, context);
+
+ osync_thread_start(thread);
+
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ message = osync_message_new(OSYNC_MESSAGE_INITIALIZE, 0, &error);
+ fail_unless(message != NULL, NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_write_int(message, 4000000);
+ osync_message_write_string(message, "this is a test string");
+ osync_message_write_long_long_int(message, 400000000);
+ osync_message_write_data(message, data, strlen(data) + 1);
+
+ fail_unless(osync_queue_send_message(client_queue, NULL, message, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_unref(message);
+
+ message = osync_queue_get_message(client_queue);
+
+ fail_unless(osync_message_get_command(message) == OSYNC_MESSAGE_QUEUE_HUP);
+
+ osync_message_unref(message);
+
+ osync_queue_disconnect(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ osync_thread_stop(thread);
+ osync_thread_free(thread);
+
+ int status = 0;
+ wait(&status);
+ fail_unless(WEXITSTATUS(status) == 0, NULL);
+ }
+
+ fail_unless(system("ls /tmp/testpipe-client &> /dev/null") == 0, NULL);
+
+ fail_unless(osync_queue_remove(client_queue, &error), NULL);
+ fail_unless(osync_queue_remove(server_queue, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ fail_unless(system("ls /tmp/testpipe-client &> /dev/null") != 0, NULL);
+
+ osync_queue_free(client_queue);
+ osync_queue_free(server_queue);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+int num_msgs = 0;
+int req_msgs = 1000;
+
+void server_handler2(OSyncMessage *message, void *user_data)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, message, user_data);
+ OSyncError *error = NULL;
+ char *data = "this is another test string";
+
+ osync_assert(GPOINTER_TO_INT(user_data) ==1);
+
+ num_msgs++;
+ fail_unless(osync_message_get_command(message) == OSYNC_MESSAGE_INITIALIZE);
+
+ if (num_msgs >= req_msgs) {
+ osync_queue_disconnect(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+ } else {
+ message = osync_message_new(OSYNC_MESSAGE_INITIALIZE, 0, &error);
+ fail_unless(message != NULL, NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_write_int(message, 4000000);
+ osync_message_write_string(message, "this is a test string");
+ osync_message_write_long_long_int(message, 400000000);
+ osync_message_write_data(message, data, strlen(data) + 1);
+
+ fail_unless(osync_queue_send_message(client_queue, NULL, message, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_unref(message);
+ }
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+void client_handler2(OSyncMessage *message, void *user_data)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, message, user_data);
+ OSyncError *error = NULL;
+
+ osync_assert(GPOINTER_TO_INT(user_data) ==1);
+ osync_assert(osync_message_get_command(message) == OSYNC_MESSAGE_INITIALIZE);
+
+ int int1;
+ long long int longint1;
+ char *string;
+ void *databuf;
+
+ osync_message_read_int(message, &int1);
+ osync_message_read_const_string(message, &string);
+ osync_message_read_long_long_int(message, &longint1);
+ osync_message_read_const_data(message, &databuf, strlen("this is another test string") + 1);
+
+ fail_unless(int1 == 4000000, NULL);
+ fail_unless(!strcmp(string, "this is a test string"), NULL);
+ fail_unless(longint1 == 400000000, NULL);
+ fail_unless(!strcmp(databuf, "this is another test string"), NULL);
+
+ OSyncMessage *reply = osync_message_new(OSYNC_MESSAGE_INITIALIZE, 0, &error);
+
+ osync_queue_send_message(server_queue, NULL, reply, &error);
+
+ osync_message_unref(reply);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+START_TEST (ipc_loop_stress)
+{
+ char *testbed = setup_testbed(NULL);
+ _remove_pipe("/tmp/testpipe-server");
+ _remove_pipe("/tmp/testpipe-client");
+
+ OSyncError *error = NULL;
+ server_queue = osync_queue_new("/tmp/testpipe-server", &error);
+ client_queue = osync_queue_new("/tmp/testpipe-client", &error);
+ OSyncMessage *message = NULL;
+
+ osync_queue_create(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ osync_queue_create(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+ char *data = "this is another test string";
+
+ pid_t cpid = fork();
+ if (cpid == 0) { //Child
+
+ GMainContext *context = g_main_context_new();
+ OSyncThread *thread = osync_thread_new(context, &error);
+
+ osync_queue_set_message_handler(client_queue, client_handler2, GINT_TO_POINTER(1));
+
+ osync_queue_setup_with_gmainloop(client_queue, context);
+
+ osync_thread_start(thread);
+
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ message = osync_queue_get_message(server_queue);
+
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_QUEUE_HUP) {
+ exit (1);
+ }
+
+ osync_message_unref(message);
+
+ if (osync_queue_disconnect(server_queue, &error) != TRUE || error != NULL)
+ exit(1);
+ osync_queue_free(server_queue);
+
+ osync_assert(osync_queue_disconnect(client_queue, &error));
+ osync_assert(error == NULL);
+
+ osync_thread_stop(thread);
+ osync_thread_free(thread);
+
+ osync_queue_free(client_queue);
+
+ g_free(testbed);
+
+ exit(0);
+ } else {
+ GMainContext *context = g_main_context_new();
+ OSyncThread *thread = osync_thread_new(context, &error);
+
+ osync_queue_set_message_handler(server_queue, server_handler2, GINT_TO_POINTER(1));
+
+ osync_queue_setup_with_gmainloop(server_queue, context);
+
+ osync_thread_start(thread);
+
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ message = osync_message_new(OSYNC_MESSAGE_INITIALIZE, 0, &error);
+ fail_unless(message != NULL, NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_write_int(message, 4000000);
+ osync_message_write_string(message, "this is a test string");
+ osync_message_write_long_long_int(message, 400000000);
+ osync_message_write_data(message, data, strlen(data) + 1);
+
+ fail_unless(osync_queue_send_message(client_queue, NULL, message, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_unref(message);
+
+ message = osync_queue_get_message(client_queue);
+
+ fail_unless(osync_message_get_command(message) == OSYNC_MESSAGE_QUEUE_HUP);
+
+ osync_message_unref(message);
+
+ osync_queue_disconnect(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ osync_thread_stop(thread);
+ osync_thread_free(thread);
+
+ int status = 0;
+ wait(&status);
+ fail_unless(WEXITSTATUS(status) == 0, NULL);
+ }
+
+ fail_unless(system("ls /tmp/testpipe-client &> /dev/null") == 0, NULL);
+
+ fail_unless(osync_queue_remove(client_queue, &error), NULL);
+ fail_unless(osync_queue_remove(server_queue, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ fail_unless(system("ls /tmp/testpipe-client &> /dev/null") != 0, NULL);
+
+ osync_queue_free(client_queue);
+ osync_queue_free(server_queue);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+void callback_handler(OSyncMessage *message, void *user_data)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, message, user_data);
+ OSyncError *error = NULL;
+
+ osync_assert(GPOINTER_TO_INT(user_data) == 1);
+
+ num_msgs++;
+ fail_unless(osync_message_get_command(message) == OSYNC_MESSAGE_REPLY);
+
+ if (num_msgs >= req_msgs) {
+ osync_queue_disconnect(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+ }
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+void server_handler3(OSyncMessage *message, void *user_data)
+{
+ abort();
+}
+
+void client_handler3(OSyncMessage *message, void *user_data)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, message, user_data);
+ OSyncError *error = NULL;
+
+ osync_assert(GPOINTER_TO_INT(user_data) ==1);
+ osync_assert(osync_message_get_command(message) == OSYNC_MESSAGE_INITIALIZE);
+
+ int int1;
+ long long int longint1;
+ char *string;
+ void *databuf;
+
+ osync_message_read_int(message, &int1);
+ osync_message_read_const_string(message, &string);
+ osync_message_read_long_long_int(message, &longint1);
+ osync_message_read_const_data(message, &databuf, strlen("this is another test string") + 1);
+
+ fail_unless(int1 == 4000000, NULL);
+ fail_unless(!strcmp(string, "this is a test string"), NULL);
+ fail_unless(longint1 == 400000000, NULL);
+ fail_unless(!strcmp(databuf, "this is another test string"), NULL);
+
+ OSyncMessage *reply = osync_message_new_reply(message, &error);
+
+ osync_queue_send_message(server_queue, NULL, reply, &error);
+
+ osync_message_unref(reply);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+START_TEST (ipc_loop_callback)
+{
+ num_msgs = 0;
+
+ char *testbed = setup_testbed(NULL);
+ _remove_pipe("/tmp/testpipe-server");
+ _remove_pipe("/tmp/testpipe-client");
+
+ OSyncError *error = NULL;
+ server_queue = osync_queue_new("/tmp/testpipe-server", &error);
+ client_queue = osync_queue_new("/tmp/testpipe-client", &error);
+ OSyncMessage *message = NULL;
+
+ osync_queue_create(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ osync_queue_create(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+ char *data = "this is another test string";
+
+ pid_t cpid = fork();
+ if (cpid == 0) { //Child
+
+ GMainContext *context = g_main_context_new();
+ OSyncThread *thread = osync_thread_new(context, &error);
+
+ osync_queue_set_message_handler(client_queue, client_handler3, GINT_TO_POINTER(1));
+
+ osync_queue_setup_with_gmainloop(client_queue, context);
+
+ osync_thread_start(thread);
+
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ message = osync_queue_get_message(server_queue);
+
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_QUEUE_HUP) {
+ exit (1);
+ }
+
+ osync_message_unref(message);
+
+ if (osync_queue_disconnect(server_queue, &error) != TRUE || error != NULL)
+ exit(1);
+ osync_queue_free(server_queue);
+
+ osync_assert(osync_queue_disconnect(client_queue, &error));
+ osync_assert(error == NULL);
+
+ osync_thread_stop(thread);
+ osync_thread_free(thread);
+
+ osync_queue_free(client_queue);
+
+ g_free(testbed);
+
+ exit(0);
+ } else {
+ GMainContext *context = g_main_context_new();
+ OSyncThread *thread = osync_thread_new(context, &error);
+
+ osync_queue_set_message_handler(server_queue, server_handler3, GINT_TO_POINTER(1));
+
+ osync_queue_setup_with_gmainloop(server_queue, context);
+
+ osync_thread_start(thread);
+
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ int i = 0;
+ for (i = 0; i < req_msgs; i++) {
+ message = osync_message_new(OSYNC_MESSAGE_INITIALIZE, 0, &error);
+ fail_unless(message != NULL, NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_write_int(message, 4000000);
+ osync_message_write_string(message, "this is a test string");
+ osync_message_write_long_long_int(message, 400000000);
+ osync_message_write_data(message, data, strlen(data) + 1);
+
+ osync_message_set_handler(message, callback_handler, GINT_TO_POINTER(1));
+
+ fail_unless(osync_queue_send_message(client_queue, server_queue, message, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_unref(message);
+ }
+
+ message = osync_queue_get_message(client_queue);
+
+ fail_unless(osync_message_get_command(message) == OSYNC_MESSAGE_QUEUE_HUP);
+
+ osync_message_unref(message);
+
+ osync_queue_disconnect(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ osync_thread_stop(thread);
+ osync_thread_free(thread);
+
+ int status = 0;
+ wait(&status);
+ fail_unless(WEXITSTATUS(status) == 0, NULL);
+ }
+
+ fail_unless(system("ls /tmp/testpipe-client &> /dev/null") == 0, NULL);
+
+ fail_unless(osync_queue_remove(client_queue, &error), NULL);
+ fail_unless(osync_queue_remove(server_queue, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ fail_unless(system("ls /tmp/testpipe-client &> /dev/null") != 0, NULL);
+
+ osync_queue_free(client_queue);
+ osync_queue_free(server_queue);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+int stop_after = 500;
+
+void callback_handler2(OSyncMessage *message, void *user_data)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, message, user_data);
+
+ osync_assert(GPOINTER_TO_INT(user_data) == 1);
+
+ if (num_msgs >= stop_after) {
+ osync_assert(osync_message_get_command(message) == OSYNC_MESSAGE_ERRORREPLY);
+ } else {
+ osync_assert(osync_message_get_command(message) == OSYNC_MESSAGE_REPLY);
+ }
+
+ num_msgs++;
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+int num_msgs2 = 0;
+
+void server_handler4(OSyncMessage *message, void *user_data)
+{
+ osync_assert(osync_message_get_command(message) == OSYNC_MESSAGE_QUEUE_HUP || osync_message_get_command(message) == OSYNC_MESSAGE_QUEUE_ERROR);
+}
+
+void client_handler4(OSyncMessage *message, void *user_data)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, message, user_data);
+ OSyncError *error = NULL;
+
+ osync_assert(GPOINTER_TO_INT(user_data) ==1);
+ osync_assert(osync_message_get_command(message) == OSYNC_MESSAGE_INITIALIZE);
+
+ int int1;
+ long long int longint1;
+ char *string;
+ void *databuf;
+
+
+ osync_message_read_int(message, &int1);
+ osync_message_read_const_string(message, &string);
+ osync_message_read_long_long_int(message, &longint1);
+ osync_message_read_const_data(message, &databuf, strlen("this is another test string") + 1);
+
+ fail_unless(int1 == 4000000, NULL);
+ fail_unless(!strcmp(string, "this is a test string"), NULL);
+ fail_unless(longint1 == 400000000, NULL);
+ fail_unless(!strcmp(databuf, "this is another test string"), NULL);
+
+ if (num_msgs2 >= stop_after) {
+ osync_assert(osync_queue_disconnect(client_queue, &error));
+ osync_assert(error == NULL);
+ } else {
+ OSyncMessage *reply = osync_message_new_reply(message, &error);
+
+ osync_queue_send_message(server_queue, NULL, reply, &error);
+
+ osync_message_unref(reply);
+ }
+
+ num_msgs2++;
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+START_TEST (ipc_callback_break)
+{
+ num_msgs = 0;
+
+ char *testbed = setup_testbed(NULL);
+ _remove_pipe("/tmp/testpipe-server");
+ _remove_pipe("/tmp/testpipe-client");
+
+ OSyncError *error = NULL;
+ server_queue = osync_queue_new("/tmp/testpipe-server", &error);
+ client_queue = osync_queue_new("/tmp/testpipe-client", &error);
+ OSyncMessage *message = NULL;
+
+ osync_queue_create(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ osync_queue_create(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+ char *data = "this is another test string";
+
+ pid_t cpid = fork();
+ if (cpid == 0) { //Child
+
+ GMainContext *context = g_main_context_new();
+ OSyncThread *thread = osync_thread_new(context, &error);
+
+ osync_queue_set_message_handler(client_queue, client_handler4, GINT_TO_POINTER(1));
+
+ osync_queue_setup_with_gmainloop(client_queue, context);
+
+ osync_thread_start(thread);
+
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ while (osync_queue_is_connected(client_queue)) { usleep(100); }
+
+ osync_assert(osync_queue_disconnect(server_queue, &error));
+ osync_assert(error == NULL);
+
+ osync_thread_stop(thread);
+ osync_thread_free(thread);
+
+ osync_queue_free(client_queue);
+ osync_queue_free(server_queue);
+
+ g_free(testbed);
+ exit(0);
+ } else {
+ GMainContext *context = g_main_context_new();
+ OSyncThread *thread = osync_thread_new(context, &error);
+
+ osync_queue_set_message_handler(server_queue, server_handler4, GINT_TO_POINTER(1));
+
+ osync_queue_setup_with_gmainloop(server_queue, context);
+
+ osync_thread_start(thread);
+
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ int i = 0;
+ for (i = 0; i < req_msgs; i++) {
+ message = osync_message_new(OSYNC_MESSAGE_INITIALIZE, 0, &error);
+ fail_unless(message != NULL, NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_write_int(message, 4000000);
+ osync_message_write_string(message, "this is a test string");
+ osync_message_write_long_long_int(message, 400000000);
+ osync_message_write_data(message, data, strlen(data) + 1);
+
+ osync_message_set_handler(message, callback_handler2, GINT_TO_POINTER(1));
+
+ fail_unless(osync_queue_send_message(client_queue, server_queue, message, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_unref(message);
+ }
+
+ message = osync_queue_get_message(client_queue);
+
+ fail_unless(osync_message_get_command(message) == OSYNC_MESSAGE_QUEUE_HUP);
+
+ osync_message_unref(message);
+
+ while (num_msgs < req_msgs) { usleep(100); };
+
+ osync_queue_disconnect(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ osync_queue_disconnect(server_queue, &error);
+ osync_assert(error == NULL);
+
+ osync_thread_stop(thread);
+ osync_thread_free(thread);
+
+ int status = 0;
+ wait(&status);
+ fail_unless(WEXITSTATUS(status) == 0, NULL);
+ }
+
+ fail_unless(system("ls /tmp/testpipe-client &> /dev/null") == 0, NULL);
+
+ fail_unless(osync_queue_remove(client_queue, &error), NULL);
+ fail_unless(osync_queue_remove(server_queue, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ fail_unless(system("ls /tmp/testpipe-client &> /dev/null") != 0, NULL);
+
+ osync_queue_free(client_queue);
+ osync_queue_free(server_queue);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+
+START_TEST (ipc_pipes)
+{
+ char *testbed = setup_testbed(NULL);
+
+ OSyncError *error = NULL;
+ OSyncQueue *read1 = NULL;
+ OSyncQueue *write1 = NULL;
+ char *data = "this is another test string";
+
+ osync_assert(osync_queue_new_pipes(&read1, &write1, &error));
+ osync_assert(error == NULL);
+
+ fail_unless(osync_queue_connect(read1, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(write1, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ OSyncMessage *message = osync_message_new(OSYNC_MESSAGE_INITIALIZE, 0, &error);
+ fail_unless(message != NULL, NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_write_int(message, 4000000);
+ osync_message_write_string(message, "this is a test string");
+ osync_message_write_long_long_int(message, 400000000);
+ osync_message_write_data(message, data, strlen(data) + 1);
+
+ fail_unless(osync_queue_send_message(write1, NULL, message, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+ osync_message_unref(message);
+
+ message = osync_queue_get_message(read1);
+ osync_assert(osync_message_get_command(message) == OSYNC_MESSAGE_INITIALIZE);
+
+ int int1;
+ long long int longint1;
+ char *string;
+ void *databuf;
+
+ osync_message_read_int(message, &int1);
+ osync_message_read_const_string(message, &string);
+ osync_message_read_long_long_int(message, &longint1);
+ osync_message_read_const_data(message, &databuf, strlen("this is another test string") + 1);
+
+ fail_unless(int1 == 4000000, NULL);
+ fail_unless(!strcmp(string, "this is a test string"), NULL);
+ fail_unless(longint1 == 400000000, NULL);
+ fail_unless(!strcmp(databuf, "this is another test string"), NULL);
+
+ osync_message_unref(message);
+
+ osync_assert(osync_queue_disconnect(read1, &error));
+ osync_assert(error == NULL);
+
+ message = osync_queue_get_message(write1);
+ osync_assert(osync_message_get_command(message) == OSYNC_MESSAGE_QUEUE_HUP);
+ osync_message_unref(message);
+
+ osync_assert(osync_queue_disconnect(write1, &error));
+ osync_assert(error == NULL);
+
+
+ osync_queue_free(read1);
+ osync_queue_free(write1);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (ipc_pipes_stress)
+{
+ char *testbed = setup_testbed(NULL);
+
+ OSyncError *error = NULL;
+ OSyncQueue *read1 = NULL;
+ OSyncQueue *read2 = NULL;
+ OSyncQueue *write1 = NULL;
+ OSyncQueue *write2 = NULL;
+
+
+ // First the pipe from the parent to the child
+ osync_assert(osync_queue_new_pipes(&read1, &write1, &error));
+ osync_assert(error == NULL);
+
+ // Then the pipe from the child to the parent
+ osync_assert(osync_queue_new_pipes(&read2, &write2, &error));
+ osync_assert(error == NULL);
+
+ OSyncMessage *message = NULL;
+
+ char *data = "this is another test string";
+
+ pid_t cpid = fork();
+ if (cpid == 0) { //Child
+
+ osync_assert(osync_queue_disconnect(write1, &error));
+ osync_queue_free(write1);
+
+ osync_assert(osync_queue_disconnect(read2, &error));
+ osync_queue_free(read2);
+
+ client_queue = read1;
+ server_queue = write2;
+
+ GMainContext *context = g_main_context_new();
+ OSyncThread *thread = osync_thread_new(context, &error);
+
+ osync_queue_set_message_handler(client_queue, client_handler2, GINT_TO_POINTER(1));
+
+ osync_queue_setup_with_gmainloop(client_queue, context);
+
+ osync_thread_start(thread);
+
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ message = osync_queue_get_message(server_queue);
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_QUEUE_HUP) {
+ exit (1);
+ }
+ osync_message_unref(message);
+
+
+ if (osync_queue_disconnect(server_queue, &error) != TRUE || error != NULL)
+ exit(1);
+ osync_queue_free(server_queue);
+
+ osync_assert(osync_queue_disconnect(client_queue, &error));
+ osync_assert(error == NULL);
+
+ osync_thread_stop(thread);
+ osync_thread_free(thread);
+
+ osync_queue_free(client_queue);
+
+ g_free(testbed);
+
+ exit(0);
+ } else {
+
+ osync_assert(osync_queue_disconnect(write2, &error));
+ osync_queue_free(write2);
+
+ osync_assert(osync_queue_disconnect(read1, &error));
+ osync_queue_free(read1);
+
+ client_queue = write1;
+ server_queue = read2;
+
+ GMainContext *context = g_main_context_new();
+ OSyncThread *thread = osync_thread_new(context, &error);
+
+ osync_queue_set_message_handler(server_queue, server_handler2, GINT_TO_POINTER(1));
+
+ osync_queue_setup_with_gmainloop(server_queue, context);
+
+ osync_thread_start(thread);
+
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ message = osync_message_new(OSYNC_MESSAGE_INITIALIZE, 0, &error);
+ fail_unless(message != NULL, NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_write_int(message, 4000000);
+ osync_message_write_string(message, "this is a test string");
+ osync_message_write_long_long_int(message, 400000000);
+ osync_message_write_data(message, data, strlen(data) + 1);
+
+ fail_unless(osync_queue_send_message(client_queue, NULL, message, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_unref(message);
+
+ message = osync_queue_get_message(client_queue);
+ fail_unless(osync_message_get_command(message) == OSYNC_MESSAGE_QUEUE_HUP);
+
+ osync_message_unref(message);
+
+ osync_queue_disconnect(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ osync_thread_stop(thread);
+ osync_thread_free(thread);
+
+ int status = 0;
+ wait(&status);
+ fail_unless(WEXITSTATUS(status) == 0, NULL);
+ }
+
+ osync_queue_free(client_queue);
+ osync_queue_free(server_queue);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (ipc_callback_break_pipes)
+{
+ num_msgs = 0;
+
+ char *testbed = setup_testbed(NULL);
+
+ OSyncError *error = NULL;
+ OSyncQueue *read1 = NULL;
+ OSyncQueue *read2 = NULL;
+ OSyncQueue *write1 = NULL;
+ OSyncQueue *write2 = NULL;
+ OSyncMessage *message = NULL;
+
+ // First the pipe from the parent to the child
+ osync_assert(osync_queue_new_pipes(&read1, &write1, &error));
+ osync_assert(error == NULL);
+
+ // Then the pipe from the child to the parent
+ osync_assert(osync_queue_new_pipes(&read2, &write2, &error));
+ osync_assert(error == NULL);
+
+ char *data = "this is another test string";
+
+ pid_t cpid = fork();
+ if (cpid == 0) { //Child
+
+ osync_assert(osync_queue_disconnect(write1, &error));
+ osync_queue_free(write1);
+
+ osync_assert(osync_queue_disconnect(read2, &error));
+ osync_queue_free(read2);
+
+ client_queue = read1;
+ server_queue = write2;
+
+ GMainContext *context = g_main_context_new();
+ OSyncThread *thread = osync_thread_new(context, &error);
+
+ osync_queue_set_message_handler(client_queue, client_handler4, GINT_TO_POINTER(1));
+
+ osync_queue_setup_with_gmainloop(client_queue, context);
+
+ osync_thread_start(thread);
+
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ while (osync_queue_is_connected(client_queue)) { usleep(100); }
+
+ osync_assert(osync_queue_disconnect(server_queue, &error));
+ osync_assert(error == NULL);
+
+ osync_thread_stop(thread);
+ osync_thread_free(thread);
+
+ osync_queue_free(client_queue);
+ osync_queue_free(server_queue);
+
+ g_free(testbed);
+ exit(0);
+ } else {
+
+ osync_assert(osync_queue_disconnect(write2, &error));
+ osync_queue_free(write2);
+
+ osync_assert(osync_queue_disconnect(read1, &error));
+ osync_queue_free(read1);
+
+ client_queue = write1;
+ server_queue = read2;
+
+ GMainContext *context = g_main_context_new();
+ OSyncThread *thread = osync_thread_new(context, &error);
+
+ osync_queue_set_message_handler(server_queue, server_handler4, GINT_TO_POINTER(1));
+
+ osync_queue_setup_with_gmainloop(server_queue, context);
+
+ osync_thread_start(thread);
+
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ int i = 0;
+ for (i = 0; i < req_msgs; i++) {
+ message = osync_message_new(OSYNC_MESSAGE_INITIALIZE, 0, &error);
+ fail_unless(message != NULL, NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_write_int(message, 4000000);
+ osync_message_write_string(message, "this is a test string");
+ osync_message_write_long_long_int(message, 400000000);
+ osync_message_write_data(message, data, strlen(data) + 1);
+
+ osync_message_set_handler(message, callback_handler2, GINT_TO_POINTER(1));
+
+ fail_unless(osync_queue_send_message(client_queue, server_queue, message, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_unref(message);
+ }
+
+ message = osync_queue_get_message(client_queue);
+
+ fail_unless(osync_message_get_command(message) == OSYNC_MESSAGE_QUEUE_HUP);
+
+ osync_message_unref(message);
+
+ while (num_msgs < req_msgs) { usleep(100); };
+
+ osync_queue_disconnect(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ osync_queue_disconnect(server_queue, &error);
+ osync_assert(error == NULL);
+
+ osync_thread_stop(thread);
+ osync_thread_free(thread);
+
+ int status = 0;
+ wait(&status);
+ fail_unless(WEXITSTATUS(status) == 0, NULL);
+ }
+
+ osync_queue_free(client_queue);
+ osync_queue_free(server_queue);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+Suite *ipc_suite(void)
+{
+ Suite *s = suite_create("IPC");
+ //Suite *s2 = suite_create("IPC");
+
+ create_case(s, "ipc_new", ipc_new);
+ create_case(s, "ipc_create", ipc_create);
+ create_case(s, "ipc_connect", ipc_connect);
+ create_case(s, "ipc_payload", ipc_payload);
+ create_case(s, "ipc_payload_wait", ipc_payload_wait);
+ create_case(s, "ipc_payload_stress", ipc_payload_stress);
+ create_case(s, "ipc_payload_stress2", ipc_payload_stress2);
+ create_case(s, "ipc_large_payload", ipc_large_payload);
+
+ create_case(s, "ipc_error_no_pipe", ipc_error_no_pipe);
+ create_case(s, "ipc_error_perm", ipc_error_perm);
+ create_case(s, "ipc_error_rem", ipc_error_rem);
+ create_case(s, "ipc_error_rem2", ipc_error_rem2);
+
+ create_case(s, "ipc_loop_payload", ipc_loop_payload);
+ create_case(s, "ipc_loop_stress", ipc_loop_stress);
+ create_case(s, "ipc_loop_callback", ipc_loop_callback);
+ create_case(s, "ipc_callback_break", ipc_callback_break);
+
+ create_case(s, "ipc_pipes", ipc_pipes);
+ create_case(s, "ipc_pipes_stress", ipc_pipes_stress);
+ create_case(s, "ipc_callback_break_pipes", ipc_callback_break_pipes);
+
+ return s;
+}
+
+int main(void)
+{
+ int nf;
+
+ Suite *s = ipc_suite();
+
+ SRunner *sr;
+ sr = srunner_create(s);
+
+// srunner_set_fork_status (sr, CK_NOFORK);
+ srunner_run_all(sr, CK_NORMAL);
+ nf = srunner_ntests_failed(sr);
+ srunner_free(sr);
+ return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/debian/opensync/opensync-0.22/tests/check_lock.c b/debian/opensync/opensync-0.22/tests/check_lock.c
new file mode 100644
index 00000000..245ea419
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/check_lock.c
@@ -0,0 +1,275 @@
+#include "support.h"
+
+START_TEST (simple_lock)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ fail_unless(osync_group_lock(group) == OSYNC_LOCK_OK, NULL);
+ osync_group_unlock(group, TRUE);
+
+ fail_unless(!g_file_test("configs/group/lock", G_FILE_TEST_EXISTS), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (simple_lock_stale)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ fail_unless(osync_group_lock(group) == OSYNC_LOCK_OK, NULL);
+ osync_group_unlock(group, FALSE);
+
+ fail_unless(g_file_test("configs/group/lock", G_FILE_TEST_EXISTS), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (simple_seq_lock)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ fail_unless(osync_group_lock(group) == OSYNC_LOCK_OK, NULL);
+ osync_group_unlock(group, TRUE);
+
+ fail_unless(osync_group_lock(group) == OSYNC_LOCK_OK, NULL);
+ osync_group_unlock(group, TRUE);
+
+ fail_unless(!g_file_test("configs/group/lock", G_FILE_TEST_EXISTS), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (simple_seq_stale_lock)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ fail_unless(osync_group_lock(group) == OSYNC_LOCK_OK, NULL);
+ osync_group_unlock(group, FALSE);
+
+ fail_unless(osync_group_lock(group) == OSYNC_LOCK_STALE, NULL);
+ osync_group_unlock(group, TRUE);
+
+ fail_unless(!g_file_test("configs/group/lock", G_FILE_TEST_EXISTS), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (dual_lock)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ fail_unless(osync_group_lock(group) == OSYNC_LOCK_OK, NULL);
+ fail_unless(osync_group_lock(group) == OSYNC_LOCKED, NULL);
+
+ osync_group_unlock(group, TRUE);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (dual_lock2)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ OSyncGroup *group2 = osync_group_load(osync, "configs/group", NULL);
+
+ fail_unless(osync_group_lock(group) == OSYNC_LOCK_OK, NULL);
+ fail_unless(osync_group_lock(group2) == OSYNC_LOCKED, NULL);
+
+ osync_group_unlock(group, TRUE);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multi_unlock)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ osync_group_unlock(group, TRUE);
+ osync_group_unlock(group, FALSE);
+
+ fail_unless(osync_group_lock(group) == OSYNC_LOCK_OK, NULL);
+
+ osync_group_unlock(group, FALSE);
+ osync_group_unlock(group, TRUE);
+
+ fail_unless(osync_group_lock(group) == OSYNC_LOCK_STALE, NULL);
+
+ osync_group_unlock(group, TRUE);
+ osync_group_unlock(group, FALSE);
+
+ fail_unless(!g_file_test("configs/group/lock", G_FILE_TEST_EXISTS), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+#if 0
+START_TEST (dual_sync_engine_lock)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ OSyncGroup *group2 = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ OSyncEngine *engine2 = osengine_new(group2, &error);
+ osengine_set_enginestatus_callback(engine2, engine_status, NULL);
+
+ fail_unless(osengine_init(engine, &error), NULL);
+ fail_unless(!osengine_init(engine2, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+ osync_error_free(&error);
+
+ fail_unless(synchronize_once(engine, &error), NULL);
+ fail_unless(num_engine_prev_unclean == 0, NULL);
+ fail_unless(!synchronize_once(engine2, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+ osync_error_free(&error);
+ fail_unless(num_engine_prev_unclean == 0, NULL);
+ osengine_finalize(engine);
+
+ fail_unless(osengine_init(engine2, &error), NULL);
+ fail_unless(synchronize_once(engine2, &error), NULL);
+ fail_unless(num_engine_prev_unclean == 0, NULL);
+ osengine_finalize(engine2);
+
+ osengine_free(engine);
+ osengine_free(engine2);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" == \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" == \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (dual_sync_engine_unclean)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ fail_unless(!osync_group_get_slow_sync(group, "data"), NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+
+ fail_unless(osengine_init(engine, &error), NULL);
+
+ /* Quit the engine thread, before free()ing it
+ *
+ * We want to simulate a unclean engine exit (so we can't use
+ * osengine_finalize() here), but we don't want the old engine thread to
+ * be running and stealing the messages going to the second engine.
+ */
+ if (engine->thread) {
+ g_main_loop_quit(engine->syncloop);
+ g_thread_join(engine->thread);
+ }
+
+ osengine_free(engine);
+ osync_group_free(group);
+
+ group = osync_group_load(osync, "configs/group", NULL);
+ engine = osengine_new(group, &error);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+
+ fail_unless(!osync_group_get_slow_sync(engine->group, "data"), NULL);
+
+ num_engine_prev_unclean = 0;
+ fail_unless(osengine_init(engine, &error), NULL);
+ fail_unless(num_engine_prev_unclean == 1, NULL);
+
+ fail_unless(osync_group_get_slow_sync(engine->group, "data"), NULL);
+
+ fail_unless(synchronize_once(engine, &error), NULL);
+ osengine_finalize(engine);
+ osengine_free(engine);
+ osync_group_free(group);
+
+ group = osync_group_load(osync, "configs/group", NULL);
+ engine = osengine_new(group, &error);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+
+ fail_unless(!osync_group_get_slow_sync(engine->group, "data"), NULL);
+ fail_unless(osengine_init(engine, &error), NULL);
+ fail_unless(!osync_group_get_slow_sync(engine->group, "data"), NULL);
+
+ fail_unless(synchronize_once(engine, &error), NULL);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(num_engine_prev_unclean == 0, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" == \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" == \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+#endif
+
+Suite *lock_suite(void)
+{
+ Suite *s = suite_create("Locks");
+ //Suite *s2 = suite_create("Locks");
+ create_case(s, "simple_lock", simple_lock);
+ create_case(s, "simple_lock_stale", simple_lock_stale);
+ create_case(s, "simple_seq_lock", simple_seq_lock);
+ create_case(s, "simple_seq_stale_lock", simple_seq_stale_lock);
+ create_case(s, "dual_lock", dual_lock);
+ create_case(s, "dual_lock2", dual_lock2);
+ create_case(s, "multi_unlock", multi_unlock);
+/* create_case(s, "dual_sync_engine_lock", dual_sync_engine_lock);
+ create_case(s, "dual_sync_engine_unclean", dual_sync_engine_unclean);*/
+
+
+ return s;
+}
+
+int main(void)
+{
+ int nf;
+
+ Suite *s = lock_suite();
+
+ SRunner *sr;
+ sr = srunner_create(s);
+
+// srunner_set_fork_status (sr, CK_NOFORK);
+ srunner_run_all(sr, CK_NORMAL);
+ nf = srunner_ntests_failed(sr);
+ srunner_free(sr);
+ return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/debian/opensync/opensync-0.22/tests/check_member.c b/debian/opensync/opensync-0.22/tests/check_member.c
new file mode 100644
index 00000000..ec5bad0c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/check_member.c
@@ -0,0 +1,42 @@
+#include <check.h>
+#include <opensync/opensync.h>
+#include <opensync/opensync_internals.h>
+#include <stdlib.h>
+
+#include <glib.h>
+#include <gmodule.h>
+
+START_TEST (test_create)
+{
+ OSyncMember *member = NULL;
+ member = osync_member_new(NULL);
+ fail_unless(member != NULL, "Member == NULL on creation");
+}
+END_TEST
+
+Suite *member_suite(void)
+{
+ Suite *s = suite_create("Member");
+ TCase *tc_core = tcase_create("Core");
+
+ suite_add_tcase (s, tc_core);
+ tcase_add_test(tc_core, test_create);
+
+ return s;
+}
+
+int main(void)
+{
+ int nf;
+
+ Suite *s = member_suite();
+
+ SRunner *sr;
+ sr = srunner_create(s);
+
+// srunner_set_fork_status (sr, CK_NOFORK);
+ srunner_run_all(sr, CK_NORMAL);
+ nf = srunner_ntests_failed(sr);
+ srunner_free(sr);
+ return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/debian/opensync/opensync-0.22/tests/check_multisync.c b/debian/opensync/opensync-0.22/tests/check_multisync.c
new file mode 100644
index 00000000..28f547d9
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/check_multisync.c
@@ -0,0 +1,1829 @@
+#include "support.h"
+
+START_TEST (multisync_easy_new)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ mark_point();
+
+ OSyncEngine *engine = init_engine(group);
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+ fail_unless(num_read == 1, NULL);
+ fail_unless(num_engine_end_conflicts == 1, NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, 0, 3, "testdata", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_easy_mod)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ mark_point();
+
+ OSyncEngine *engine = init_engine(group);
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ fail_unless(num_written == 2, NULL);
+ fail_unless(num_read == 1, NULL);
+ fail_unless(num_engine_end_conflicts = 1, NULL);
+
+ sleep(2);
+ system("cp newdata data3/testdata");
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+ fail_unless(num_read == 1, NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, 0, 3, "testdata", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_dual_mod)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ mark_point();
+
+ OSyncEngine *engine = init_engine(group);
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+ fail_unless(num_read == 1, NULL);
+ fail_unless(num_engine_end_conflicts == 1, NULL);
+
+ sleep(2);
+ system("cp newdata data1/testdata");
+ system("cp newdata data3/testdata");
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_written == 1, NULL);
+ fail_unless(num_read == 2, NULL);
+ fail_unless(num_engine_end_conflicts == 1, NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, 0, 3, "testdata", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_triple_mod)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ mark_point();
+
+ OSyncEngine *engine = init_engine(group);
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+ fail_unless(num_read == 1, NULL);
+ fail_unless(num_engine_end_conflicts == 1, NULL);
+
+ sleep(2);
+ system("cp newdata data1/testdata");
+ system("cp newdata data2/testdata");
+ system("cp newdata data3/testdata");
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ fail_unless(num_written == 0, NULL);
+ fail_unless(num_read == 3, NULL);
+ fail_unless(num_engine_end_conflicts = 1, NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, 0, 3, "testdata", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_dual_new)
+{
+ char *testbed = setup_testbed("multisync_easy_new_partial");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ mark_point();
+
+ OSyncEngine *engine = init_engine(group);
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_written == 1, NULL);
+ fail_unless(num_read == 2, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, 0, 3, "testdata", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ system("rm -f data2/testdata");
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ maptable = mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ table = hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+
+START_TEST (multisync_triple_new)
+{
+ char *testbed = setup_testbed("multisync_easy_new_partial2");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ mark_point();
+
+ OSyncEngine *engine = init_engine(group);
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_written == 0, NULL);
+ fail_unless(num_read == 3, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, 0, 3, "testdata", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ system("rm -f data1/testdata");
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ maptable = mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ table = hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_easy_del)
+{
+ char *testbed = setup_testbed("multisync_conflict_changetype_choose");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncEngine *engine = init_engine(group);
+ osengine_set_conflict_callback(engine, conflict_handler_duplication, NULL);
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ system("rm -f data2/testdata");
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_read == 1, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_written == 2, NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_dual_del)
+{
+ char *testbed = setup_testbed("multisync_conflict_changetype_choose");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncEngine *engine = init_engine(group);
+ osengine_set_conflict_callback(engine, conflict_handler_duplication, NULL);
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ system("rm -f data1/testdata");
+ system("rm -f data3/testdata");
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_read == 2, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_written == 1, NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_triple_del)
+{
+ char *testbed = setup_testbed("multisync_conflict_changetype_choose");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncEngine *engine = init_engine(group);
+ osengine_set_conflict_callback(engine, conflict_handler_duplication, NULL);
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ system("rm -f data1/testdata");
+ system("rm -f data2/testdata");
+ system("rm -f data3/testdata");
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_read == 3, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_written == 0, NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_conflict_data_choose)
+{
+ char *testbed = setup_testbed("multisync_conflict_data_choose");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ mark_point();
+
+ OSyncEngine *engine = init_engine(group);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_first, GINT_TO_POINTER(2));
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+ fail_unless(num_read == 2, NULL);
+ fail_unless(num_conflicts == 1, NULL);
+ fail_unless(num_engine_end_conflicts == 1, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, 0, 3, "testdata", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ system("rm -f data3/testdata");
+
+ mark_point();
+ num_conflicts = 0;
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_conflict_data_choose2)
+{
+ char *testbed = setup_testbed("multisync_conflict_data_choose2");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ mark_point();
+
+ OSyncEngine *engine = init_engine(group);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_first, GINT_TO_POINTER(3));
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_read == 3, NULL);
+ fail_unless(num_conflicts == 1, NULL);
+ fail_unless(num_engine_end_conflicts == 1, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, 0, 3, "testdata", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ system("rm -f data3/testdata");
+
+ mark_point();
+ num_conflicts = 0;
+ synchronize_once(engine, NULL);;
+ osengine_finalize(engine);
+
+ mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_conflict_changetype_choose)
+{
+ char *testbed = setup_testbed("multisync_conflict_changetype_choose");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncEngine *engine = init_engine(group);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ sleep(2);
+
+ system("rm -f data1/testdata");
+ system("cp newdata data3/testdata");
+
+ num_written = 0;
+ num_read = 0;
+ num_conflicts = 0;
+ synchronize_once(engine, NULL);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_read == 2, NULL);
+ fail_unless(num_conflicts == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+ fail_unless(num_engine_end_conflicts == 1, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, 0, 3, "testdata", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ system("rm -f data1/testdata");
+
+ mark_point();
+ num_conflicts = 0;
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_conflict_changetype_choose2)
+{
+ char *testbed = setup_testbed("multisync_conflict_changetype_choose");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncEngine *engine = init_engine(group);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_deleted, GINT_TO_POINTER(3));
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ sleep(2);
+
+ system("rm -f data1/testdata");
+ system("cp newdata data3/testdata");
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_read == 2, NULL);
+ fail_unless(num_conflicts == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_conflict_hybrid_choose)
+{
+ char *testbed = setup_testbed("multisync_conflict_changetype_choose");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncEngine *engine = init_engine(group);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ sleep(2);
+
+ system("rm -f data1/testdata");
+ system("cp newdata data3/testdata");
+ system("cp newdata2 data2/testdata");
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_read == 3, NULL);
+ fail_unless(num_conflicts == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, 0, 3, "testdata", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ system("rm -f data1/testdata");
+
+ mark_point();
+ num_conflicts = 0;
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_conflict_hybrid_choose2)
+{
+ char *testbed = setup_testbed("multisync_conflict_changetype_choose");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncEngine *engine = init_engine(group);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_deleted, GINT_TO_POINTER(3));
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ sleep(2);
+
+ system("rm -f data1/testdata");
+ system("cp newdata data3/testdata");
+ system("cp newdata2 data2/testdata");
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_read == 3, NULL);
+ fail_unless(num_conflicts == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_conflict_data_duplicate)
+{
+ char *testbed = setup_testbed("multisync_conflict_data_choose");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ mark_point();
+
+ OSyncEngine *engine = init_engine(group);
+ osengine_set_conflict_callback(engine, conflict_handler_duplication, GINT_TO_POINTER(2));
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_read == 2, NULL);
+ fail_unless(num_conflicts == 1, NULL);
+ fail_unless(num_written == 5, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 2, 0);
+ check_mapping(maptable, 1, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 3, "testdata-dupe", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata-dupe", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata-dupe", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 2);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata-dupe");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 2);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata-dupe");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 2);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata-dupe");
+ osync_hashtable_close(table);
+
+ system("rm -f data3/testdata");
+
+ synchronize_once(engine, NULL);
+
+ maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 3, "testdata-dupe", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 3, "testdata-dupe", "mockformat", "data");
+ check_mapping(maptable, 3, 0, 3, "testdata-dupe", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata-dupe");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata-dupe");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 1);
+ check_hash(table, "testdata-dupe");
+ osync_hashtable_close(table);
+
+ system("rm -f data2/testdata-dupe");
+
+ mark_point();
+ num_conflicts = 0;
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_conflict_data_duplicate2)
+{
+ char *testbed = setup_testbed("multisync_conflict_data_duplicate2");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ mark_point();
+
+ OSyncEngine *engine = init_engine(group);
+ osengine_set_conflict_callback(engine, conflict_handler_duplication, GINT_TO_POINTER(3));
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_read == 3, NULL);
+ fail_unless(num_conflicts == 1, NULL);
+ fail_unless(num_written == 8, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 3, 0);
+ check_mapping(maptable, 1, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 3, "testdata-dupe", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata-dupe", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata-dupe", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 3, "testdata-dupe-dupe", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata-dupe-dupe", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata-dupe-dupe", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 3);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata-dupe");
+ check_hash(table, "testdata-dupe-dupe");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 3);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata-dupe");
+ check_hash(table, "testdata-dupe-dupe");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 3);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata-dupe");
+ check_hash(table, "testdata-dupe-dupe");
+ osync_hashtable_close(table);
+
+ system("rm -f data3/testdata data3/testdata-dupe-dupe");
+
+ synchronize_once(engine, NULL);
+
+ maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 3, "testdata-dupe", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 3, "testdata-dupe", "mockformat", "data");
+ check_mapping(maptable, 3, 0, 3, "testdata-dupe", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata-dupe");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata-dupe");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 1);
+ check_hash(table, "testdata-dupe");
+ osync_hashtable_close(table);
+
+ system("rm -f data2/testdata-dupe");
+
+ mark_point();
+ num_conflicts = 0;
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_conflict_changetype_duplicate)
+{
+ char *testbed = setup_testbed("multisync_conflict_changetype_choose");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncEngine *engine = init_engine(group);
+ osengine_set_conflict_callback(engine, conflict_handler_duplication, GINT_TO_POINTER(3));
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ sleep(2);
+
+ system("rm -f data1/testdata");
+ system("cp newdata data3/testdata");
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_read == 2, NULL);
+ fail_unless(num_conflicts == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, 0, 3, "testdata", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ system("rm -f data1/testdata");
+
+ mark_point();
+ num_conflicts = 0;
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_conflict_changetype_duplicate2)
+{
+ char *testbed = setup_testbed("multisync_conflict_changetype_choose");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncEngine *engine = init_engine(group);
+ osengine_set_conflict_callback(engine, conflict_handler_duplication, GINT_TO_POINTER(3));
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ sleep(2);
+
+ system("rm -f data2/testdata");
+ system("rm -f data3/testdata");
+ system("cp newdata2 data1/testdata");
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_read == 3, NULL);
+ fail_unless(num_conflicts == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, 0, 3, "testdata", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ system("rm -f data1/testdata");
+
+ mark_point();
+ num_conflicts = 0;
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_conflict_hybrid_duplicate)
+{
+ char *testbed = setup_testbed("multisync_conflict_changetype_choose");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncEngine *engine = init_engine(group);
+ osengine_set_conflict_callback(engine, conflict_handler_duplication, GINT_TO_POINTER(3));
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ sleep(2);
+
+ system("rm -f data2/testdata");
+ system("cp newdata data3/testdata");
+ system("cp newdata2 data1/testdata");
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_read == 3, NULL);
+ fail_unless(num_conflicts == 1, NULL);
+ fail_unless(num_written == 5, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 2, 0);
+ check_mapping(maptable, 1, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 3, "testdata-dupe", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata-dupe", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata-dupe", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 2);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata-dupe");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 2);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata-dupe");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 2);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata-dupe");
+ osync_hashtable_close(table);
+
+ system("rm -f data1/testdata data2/testdata-dupe");
+
+ mark_point();
+ num_conflicts = 0;
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_multi_conflict)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncEngine *engine = init_engine(group);
+ osengine_set_conflict_callback(engine, conflict_handler_duplication, GINT_TO_POINTER(3));
+
+ system("cp newdata data3/testdata1");
+ system("cp newdata1 data2/testdata2");
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 3, 0);
+ check_mapping(maptable, 1, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 3, "testdata1", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata1", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata1", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 3, "testdata2", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata2", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata2", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 3);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata1");
+ check_hash(table, "testdata2");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 3);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata1");
+ check_hash(table, "testdata2");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 3);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata1");
+ check_hash(table, "testdata2");
+ osync_hashtable_close(table);
+
+ //Change statuses
+ fail_unless(num_read == 3, NULL);
+ fail_unless(num_read_info == 0, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_written == 6, NULL);
+ fail_unless(num_written_errors == 0, NULL);
+ fail_unless(num_recv_errors == 0, NULL);
+
+ //Member statuses
+ fail_unless(num_connected == 3, NULL);
+ fail_unless(num_disconnected == 3, NULL);
+ fail_unless(num_member_comitted_all == 3, NULL);
+ fail_unless(num_member_sent_changes == 3, NULL);
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_member_get_changes_errors == 0, NULL);
+ fail_unless(num_member_sync_done_errors == 0, NULL);
+ fail_unless(num_member_disconnect_errors == 0, NULL);
+ fail_unless(num_member_comitted_all_errors == 0, NULL);
+
+ //Engine statuses
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_engine_errors == 0, NULL);
+ fail_unless(num_engine_successfull == 1, NULL);
+ fail_unless(num_engine_prev_unclean == 0, NULL);
+ fail_unless(num_engine_end_conflicts == 1, NULL);
+
+
+
+ sleep(2);
+
+ system("rm -f data2/testdata");
+ system("cp newdata data3/testdata");
+
+ system("cp newdata3 data1/testdata1");
+ system("cp newdata4 data3/testdata1");
+
+ system("cp newdata data1/testdata2");
+ system("cp newdata5 data3/testdata2");
+ system("rm -f data2/testdata2");
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(num_read == 7, NULL);
+ fail_unless(num_conflicts == 3, NULL);
+ fail_unless(num_written == 12, NULL);
+ fail_unless(num_engine_end_conflicts == 1, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ maptable = mappingtable_load(group, 5, 0);
+ check_mapping(maptable, 1, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 3, "testdata1", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata1", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata1", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 3, "testdata1-dupe", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata1-dupe", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata1-dupe", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 3, "testdata2", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata2", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata2", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 3, "testdata2-dupe", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata2-dupe", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata2-dupe", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ table = hashtable_load(group, 1, 5);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata1");
+ check_hash(table, "testdata2");
+ check_hash(table, "testdata1-dupe");
+ check_hash(table, "testdata2-dupe");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 5);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata1");
+ check_hash(table, "testdata2");
+ check_hash(table, "testdata1-dupe");
+ check_hash(table, "testdata2-dupe");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 5);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata1");
+ check_hash(table, "testdata2");
+ check_hash(table, "testdata1-dupe");
+ check_hash(table, "testdata2-dupe");
+ osync_hashtable_close(table);
+
+ system("rm -f data1/*");
+
+ mark_point();
+ num_conflicts = 0;
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ maptable = mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ table = hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_delayed_conflict_handler)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncEngine *engine = init_engine(group);
+ osengine_set_conflict_callback(engine, conflict_handler_delay, GINT_TO_POINTER(3));
+
+ system("cp newdata data3/testdata1");
+ system("cp newdata1 data2/testdata2");
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 3, 0);
+ check_mapping(maptable, 1, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 3, "testdata1", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata1", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata1", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 3, "testdata2", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata2", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata2", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 3);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata1");
+ check_hash(table, "testdata2");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 3);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata1");
+ check_hash(table, "testdata2");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 3);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata1");
+ check_hash(table, "testdata2");
+ osync_hashtable_close(table);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_read == 3, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_written == 6, NULL);
+ fail_unless(num_engine_end_conflicts == 1, NULL);
+
+ sleep(2);
+
+ system("rm -f data2/testdata");
+ system("cp newdata data3/testdata");
+
+ system("cp newdata3 data1/testdata1");
+ system("rm -f data2/testdata1");
+
+ system("cp newdata data1/testdata2");
+ system("rm -f data3/testdata2");
+ system("rm -f data2/testdata2");
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(num_read == 7, NULL);
+ fail_unless(num_conflicts == 3, NULL);
+ fail_unless(num_written == 6, NULL);
+ fail_unless(num_engine_end_conflicts == 1, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ maptable = mappingtable_load(group, 3, 0);
+ check_mapping(maptable, 1, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 3, "testdata1", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata1", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata1", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 3, "testdata2", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata2", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata2", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ table = hashtable_load(group, 1, 3);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata1");
+ check_hash(table, "testdata2");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 3);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata1");
+ check_hash(table, "testdata2");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 3);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata1");
+ check_hash(table, "testdata2");
+ osync_hashtable_close(table);
+
+ system("rm -f data1/*");
+
+ mark_point();
+ num_conflicts = 0;
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ maptable = mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ table = hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_delayed_slow)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncEngine *engine = init_engine(group);
+ osengine_set_conflict_callback(engine, conflict_handler_delay, GINT_TO_POINTER(3));
+
+ system("cp newdata data3/testdata1");
+ setenv("SLOW_REPORT", "2", TRUE);
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 2, 0);
+ check_mapping(maptable, 1, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 3, "testdata1", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata1", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata1", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 2);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata1");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 2);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata1");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 2);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata1");
+ osync_hashtable_close(table);
+
+ fail_unless(num_read == 2, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_written == 4, NULL);
+ fail_unless(num_engine_end_conflicts == 1, NULL);
+
+ sleep(2);
+
+ system("cp newdata data3/testdata");
+
+ system("cp newdata3 data1/testdata1");
+ system("rm -f data2/testdata1");
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_read == 3, NULL);
+ fail_unless(num_conflicts == 1, NULL);
+ fail_unless(num_written == 4, NULL);
+ fail_unless(num_engine_end_conflicts == 1, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ maptable = mappingtable_load(group, 2, 0);
+ check_mapping(maptable, 1, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 3, "testdata1", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata1", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata1", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ table = hashtable_load(group, 1, 2);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata1");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 2);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata1");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 2);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata1");
+ osync_hashtable_close(table);
+
+ system("rm -f data1/*");
+
+ mark_point();
+ num_conflicts = 0;
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ maptable = mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ table = hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ unsetenv("SLOW_REPORT");
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+Suite *multisync_suite(void)
+{
+ Suite *s = suite_create("Multisync");
+ //Suite *s2 = suite_create("Multisync");
+ create_case(s, "multisync_easy_new", multisync_easy_new);
+ create_case(s, "multisync_dual_new", multisync_dual_new);
+ create_case(s, "multisync_triple_new", multisync_triple_new);
+ create_case(s, "multisync_easy_mod", multisync_easy_mod);
+ create_case(s, "multisync_dual_mod", multisync_dual_mod);
+ create_case(s, "multisync_triple_mod", multisync_triple_mod);
+ create_case(s, "multisync_easy_del", multisync_easy_del);
+ create_case(s, "multisync_dual_del", multisync_dual_del);
+ create_case(s, "multisync_triple_del", multisync_triple_del);
+
+ create_case(s, "multisync_conflict_data_choose", multisync_conflict_data_choose);
+ create_case(s, "multisync_conflict_data_choose2", multisync_conflict_data_choose2);
+ create_case(s, "multisync_conflict_changetype_choose", multisync_conflict_changetype_choose);
+ create_case(s, "multisync_conflict_changetype_choose2", multisync_conflict_changetype_choose2);
+ create_case(s, "multisync_conflict_hybrid_choose", multisync_conflict_hybrid_choose);
+ create_case(s, "multisync_conflict_hybrid_choose2", multisync_conflict_hybrid_choose2);
+ create_case(s, "multisync_conflict_data_duplicate", multisync_conflict_data_duplicate);
+ create_case(s, "multisync_conflict_data_duplicate2", multisync_conflict_data_duplicate2);
+ create_case(s, "multisync_conflict_changetype_duplicate", multisync_conflict_changetype_duplicate);
+ create_case(s, "multisync_conflict_changetype_duplicate2", multisync_conflict_changetype_duplicate2);
+ create_case(s, "multisync_conflict_hybrid_duplicate", multisync_conflict_hybrid_duplicate);
+ create_case(s, "multisync_multi_conflict", multisync_multi_conflict);
+
+ create_case(s, "multisync_delayed_conflict_handler", multisync_delayed_conflict_handler);
+ create_case(s, "multisync_delayed_slow", multisync_delayed_slow);
+
+ return s;
+}
+
+int main(void)
+{
+ int nf;
+
+ Suite *s = multisync_suite();
+
+ SRunner *sr;
+ sr = srunner_create(s);
+
+// srunner_set_fork_status (sr, CK_NOFORK);
+ srunner_run_all(sr, CK_NORMAL);
+ nf = srunner_ntests_failed(sr);
+ srunner_free(sr);
+ return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/debian/opensync/opensync-0.22/tests/check_plugins.c b/debian/opensync/opensync-0.22/tests/check_plugins.c
new file mode 100644
index 00000000..a14770fb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/check_plugins.c
@@ -0,0 +1,80 @@
+#include "support.h"
+
+START_TEST (plugin_create)
+{
+ OSyncPlugin *plugin = osync_plugin_new(NULL);
+ fail_unless(plugin != NULL, "plugin == NULL on creation");
+}
+END_TEST
+
+START_TEST(plugin_no_config)
+{
+ char *testbed = setup_testbed("plugin_no_config");
+ OSyncEnv *osync = init_env();
+ fail_unless(osync != NULL, NULL);
+
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ fail_unless(engine != NULL, NULL);
+ fail_unless(!osengine_init(engine, &error), NULL);
+
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(osync_env_finalize(osync, NULL), NULL);
+ osync_env_free(osync);
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST(plugin_call_custom)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncMember *member = osync_group_nth_member(group, 0);
+
+ OSyncError *error = NULL;
+ int ret = GPOINTER_TO_INT(osync_member_call_plugin(member, "mock_custom_function", GINT_TO_POINTER(1), &error));
+ fail_unless(ret == 2, NULL);
+
+ osync_env_finalize(osync, &error);
+ osync_env_free(osync);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+Suite *plugin_suite(void)
+{
+ Suite *s = suite_create("Plugins");
+ //Suite *s2 = suite_create("Plugins");
+
+ create_case(s, "plugin_create", plugin_create);
+ create_case(s, "plugin_no_config", plugin_no_config);
+ create_case(s, "plugin_call_custom", plugin_call_custom);
+
+ return s;
+}
+
+int main(void)
+{
+ int nf;
+
+ Suite *s = plugin_suite();
+
+ SRunner *sr;
+ sr = srunner_create(s);
+
+// srunner_set_fork_status (sr, CK_NOFORK);
+ srunner_run_all(sr, CK_NORMAL);
+ nf = srunner_ntests_failed(sr);
+ srunner_free(sr);
+ return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/debian/opensync/opensync-0.22/tests/check_sync.c b/debian/opensync/opensync-0.22/tests/check_sync.c
new file mode 100644
index 00000000..adcb6913
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/check_sync.c
@@ -0,0 +1,685 @@
+#include "support.h"
+
+START_TEST (sync_setup)
+{
+ char *testbed = setup_testbed("sync_setup");
+ OSyncEnv *osync = init_env();
+ osync_group_load(osync, "configs/group", NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (sync_setup_init)
+{
+ char *testbed = setup_testbed("sync_setup_init");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (sync_setup_connect)
+{
+ char *testbed = setup_testbed("sync_setup_connect");
+ num_connected = 0;
+ num_disconnected = 0;
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncEngine *engine = osengine_new(group, NULL);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+
+ OSyncError *error = NULL;
+ osengine_init(engine, &error);
+ synchronize_once(engine, &error);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(num_connected == 2, NULL);
+ fail_unless(num_disconnected == 2, NULL);
+ fail_unless(num_engine_end_conflicts == 0, NULL);
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (sync_init_error)
+{
+ char *testbed = setup_testbed("sync_init_error");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ OSyncError *error = NULL;
+
+ OSyncEngine *engine = osengine_new(group, &error);
+ fail_unless(error == NULL, NULL);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ mark_point();
+ osengine_init(engine, &error);
+
+ fail_unless(error != NULL, NULL);
+ fail_unless(error->type == OSYNC_ERROR_MISCONFIGURATION, NULL);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (sync_easy_new)
+{
+ char *testbed = setup_testbed("sync_easy_new");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ mark_point();
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ mark_point();
+ fail_unless(engine != NULL, NULL);
+ fail_unless(osengine_init(engine, &error), NULL);
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 2, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 2, "testdata", "mockformat", "data");
+ mappingtable_close(maptable);
+ OSyncHashTable *table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (sync_easy_new_del)
+{
+ char *testbed = setup_testbed("sync_easy_new_del");
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ mark_point();
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ mark_point();
+ fail_unless(engine != NULL, NULL);
+ osengine_init(engine, &error);
+ synchronize_once(engine, NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 1, 0);
+ mappingtable_close(maptable);
+
+ system("rm data1/testdata");
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+ osengine_free(engine);
+ mark_point();
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+
+ maptable = mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (sync_easy_conflict)
+{
+ char *testbed = setup_testbed("sync_easy_conflict");
+ num_conflicts = 0;
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ mark_point();
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_first, GINT_TO_POINTER(2));
+ mark_point();
+ fail_unless(engine != NULL, NULL);
+ osengine_init(engine, &error);
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+ osengine_free(engine);
+ system("diff -x \".*\" data1 data2");
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(num_conflicts == 1, NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (sync_easy_new_mapping)
+{
+ char *testbed = setup_testbed("sync_easy_new_mapping");
+ num_conflicts = 0;
+ num_written = 0;
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ mark_point();
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_first, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ mark_point();
+ fail_unless(engine != NULL, NULL);
+ osengine_init(engine, &error);
+ mark_point();
+
+ synchronize_once(engine, NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_written == 0, NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 2, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 2, "testdata", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (sync_easy_conflict_duplicate)
+{
+ char *testbed = setup_testbed("sync_easy_conflict_duplicate");
+ num_conflicts = 0;
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_conflict_callback(engine, conflict_handler_duplication, GINT_TO_POINTER(2));
+ osengine_init(engine, &error);
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(num_conflicts == 1, NULL);
+ system("diff -x \".*\" data1 data2");
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 2, 0);
+ check_mapping(maptable, 1, -1, 2, "testdata", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 2, "testdata-dupe", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 2, "testdata", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 2, "testdata-dupe", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 2);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata-dupe");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 2);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata-dupe");
+ osync_hashtable_close(table);
+
+ system("rm -f data1/testdata-dupe");
+ system("rm -f data2/testdata-dupe");
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(num_conflicts == 0, NULL);
+
+ maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 2, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 2, "testdata", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (sync_conflict_duplicate)
+{
+ char *testbed = setup_testbed("sync_conflict_duplicate");
+ num_conflicts = 0;
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_conflict_callback(engine, conflict_handler_duplication, GINT_TO_POINTER(2));
+ osengine_init(engine, &error);
+
+ synchronize_once(engine, NULL);
+
+ system("diff -x \".*\" data1 data2");
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 3, 0);
+ check_mapping(maptable, 1, -1, 2, "testdata", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 2, "testdata-dupe", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 2, "testdata-dupe-dupe", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 2, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 2, "testdata-dupe", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 2, "testdata-dupe-dupe", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 3);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata-dupe");
+ check_hash(table, "testdata-dupe-dupe");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 3);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata-dupe");
+ check_hash(table, "testdata-dupe-dupe");
+ osync_hashtable_close(table);
+
+ fail_unless(!system("rm -f data1/testdata-dupe data2/testdata-dupe-dupe"), NULL);
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+ osengine_free(engine);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(num_conflicts == 0, NULL);
+
+ maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 2, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 2, "testdata", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (sync_conflict_duplicate2)
+{
+ char *testbed = setup_testbed("sync_conflict_duplicate2");
+ num_conflicts = 0;
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_conflict_callback(engine, conflict_handler_duplication, GINT_TO_POINTER(2));
+ osengine_init(engine, &error);
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+
+ system("rm -f data1/testdata");
+ sleep(2);
+ system("cp new_data data2/testdata");
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ system("diff -x \".*\" data1 data2");
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(num_conflicts == 1, NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 2, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 2, "testdata", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 comp_data)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (sync_conflict_deldel)
+{
+ char *testbed = setup_testbed("sync_conflict_deldel");
+ num_conflicts = 0;
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_conflict_callback(engine, conflict_handler_duplication, NULL);
+ osengine_init(engine, &error);
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+
+ system("rm -f data1/testdata");
+ system("rm -f data2/testdata");
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(num_conflicts == 0, NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (sync_moddel)
+{
+ char *testbed = setup_testbed("sync_moddel");
+ num_conflicts = 0;
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_conflict_callback(engine, conflict_handler_random, GINT_TO_POINTER(2));
+ osengine_init(engine, &error);
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(num_conflicts == 0, NULL);
+
+ sleep(2);
+ system("cp new_data1 data1/testdata");
+ system("cp new_data2 data2/testdata");
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(num_conflicts == 1, NULL);
+
+ system("rm -f data2/testdata");
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(num_conflicts == 0, NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (sync_conflict_moddel)
+{
+ char *testbed = setup_testbed("sync_moddel");
+ num_conflicts = 0;
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_deleted, GINT_TO_POINTER(2));
+ osengine_init(engine, &error);
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(num_conflicts == 0, NULL);
+
+ sleep(2);
+ system("cp new_data2 data1/testdata");
+ system("rm -f data2/testdata");
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(num_conflicts == 1, NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (sync_easy_dualdel)
+{
+ char *testbed = setup_testbed("sync_easy_dualdel");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_conflict_callback(engine, conflict_handler_duplication, NULL);
+ osengine_init(engine, &error);
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+
+ system("rm -f data1/testdata");
+ system("rm -f data1/testdata2");
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+//This cannot work with the mock plugin
+/*START_TEST (sync_subdirs_new)
+{
+ char *testbed = setup_testbed("sync_subdirs_new");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ mark_point();
+
+ system("rm -rf data1/.svn");
+ system("rm -rf data2/.svn");
+ system("rm -rf data1/subdir/.svn");
+ system("rm -rf data2/subdir/.svn");
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ mark_point();
+ fail_unless(engine != NULL, NULL);
+ fail_unless(osengine_init(engine, &error), NULL);
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" -r data1 data2)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 3, 0);
+ check_mapping(maptable, 1, -1, 2, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 2, "testdata", "mockformat", "data");
+
+ check_mapping(maptable, 1, -1, 2, "subdir/testdata", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 2, "subdir/testdata", "mockformat", "data");
+
+ check_mapping(maptable, 1, -1, 2, "subdir/testdata1", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 2, "subdir/testdata1", "mockformat", "data");
+
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 3);
+ check_hash(table, "testdata");
+ check_hash(table, "subdir/testdata");
+ check_hash(table, "subdir/testdata1");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 3);
+ check_hash(table, "testdata");
+ check_hash(table, "subdir/testdata");
+ check_hash(table, "subdir/testdata1");
+ osync_hashtable_close(table);
+
+ system("rm -f data2/testdata");
+ system("rm -f data1/subdir/testdata");
+ system("rm -f data1/subdir/testdata1");
+
+ synchronize_once(engine, NULL);
+
+ maptable = mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ table = hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" -r data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data1)\" = \"xsubdir\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"xsubdir\""), NULL);
+ fail_unless(!system("test \"x$(ls data1/subdir)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2/subdir)\" = \"x\""), NULL);
+
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ destroy_testbed(testbed);
+}
+END_TEST*/
+
+Suite *env_suite(void)
+{
+ Suite *s = suite_create("Sync");
+ //Suite *s2 = suite_create("Sync");
+
+ create_case(s, "sync_setup", sync_setup);
+ create_case(s, "sync_setup_init", sync_setup_init);
+ create_case(s, "sync_init_error", sync_init_error);
+ create_case(s, "sync_setup_connect", sync_setup_connect);
+ create_case(s, "sync_easy_new", sync_easy_new);
+ create_case(s, "sync_easy_new_del", sync_easy_new_del);
+ create_case(s, "sync_easy_conflict", sync_easy_conflict);
+ create_case(s, "sync_easy_new_mapping", sync_easy_new_mapping);
+ create_case(s, "sync_easy_conflict_duplicate", sync_easy_conflict_duplicate);
+ create_case(s, "sync_easy_dualdel", sync_easy_dualdel);
+ create_case(s, "sync_conflict_duplicate2", sync_conflict_duplicate2);
+ create_case(s, "sync_conflict_deldel", sync_conflict_deldel);
+ create_case(s, "sync_moddel", sync_moddel);
+ create_case(s, "sync_conflict_moddel", sync_conflict_moddel);
+ create_case(s, "sync_conflict_duplicate", sync_conflict_duplicate);
+
+ return s;
+}
+
+int main(void)
+{
+ int nf;
+
+ Suite *s = env_suite();
+
+ SRunner *sr;
+ sr = srunner_create(s);
+
+// srunner_set_fork_status (sr, CK_NOFORK);
+ srunner_run_all(sr, CK_NORMAL);
+ nf = srunner_ntests_failed(sr);
+ srunner_free(sr);
+ return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/debian/opensync/opensync-0.22/tests/check_user.c b/debian/opensync/opensync-0.22/tests/check_user.c
new file mode 100644
index 00000000..b83d39b5
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/check_user.c
@@ -0,0 +1,48 @@
+#include <check.h>
+#include <opensync/opensync.h>
+#include <opensync/opensync_internals.h>
+
+START_TEST (user_create)
+{
+ OSyncUserInfo *osuser = osync_user_new(NULL);
+ fail_unless(osuser != NULL, "osuser == NULL on creation");
+ fail_unless(osync_user_get_confdir(osuser) != NULL, "confdir == NULL on creation");
+}
+END_TEST
+
+START_TEST (user_confdir)
+{
+ OSyncUserInfo *osuser = osync_user_new(NULL);
+ fail_unless(osync_user_get_confdir(osuser) != NULL, "configdir == NULL on creation");
+ osync_user_set_confdir(osuser, "test");
+ if (g_ascii_strcasecmp (osync_user_get_confdir(osuser), "test") != 0)
+ fail("configpath == \"test\"");
+}
+END_TEST
+
+Suite *env_suite(void)
+{
+ Suite *s = suite_create("User");
+ TCase *tc_core = tcase_create("Core");
+
+ suite_add_tcase (s, tc_core);
+ tcase_add_test(tc_core, user_create);
+ tcase_add_test(tc_core, user_confdir);
+ return s;
+}
+
+int main(void)
+{
+ int nf;
+
+ Suite *s = env_suite();
+
+ SRunner *sr;
+ sr = srunner_create(s);
+
+// srunner_set_fork_status (sr, CK_NOFORK);
+ srunner_run_all(sr, CK_NORMAL);
+ nf = srunner_ntests_failed(sr);
+ srunner_free(sr);
+ return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/debian/opensync/opensync-0.22/tests/check_vcal.c b/debian/opensync/opensync-0.22/tests/check_vcal.c
new file mode 100644
index 00000000..98aedce3
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/check_vcal.c
@@ -0,0 +1,479 @@
+#include "support.h"
+#include <time.h>
+
+static void conv_vcal(const char *filename)
+{
+ char *command = g_strdup_printf("cp %s/"OPENSYNC_TESTDATA"%s .", g_get_current_dir(), filename);
+ char *testbed = setup_testbed(NULL);
+ system(command);
+ g_free(command);
+
+
+ OSyncError *error = NULL;
+ OSyncEnv *env = init_env();
+
+ OSyncFormatEnv *conv_env = osync_conv_env_new(env);
+ fail_unless(conv_env != NULL, NULL);
+
+ char *buffer;
+ int size;
+
+ char *file = g_path_get_basename(filename);
+ fail_unless(osync_file_read(file, &buffer, &size, &error), NULL);
+
+ OSyncChange *change = osync_change_new();
+ osync_change_set_uid(change, file);
+ osync_change_set_data(change, buffer, size + 1, TRUE);
+ osync_change_set_conv_env(change, conv_env);
+
+ osync_change_set_objformat_string(change, "plain");
+
+ OSyncObjFormat *sourceformat = osync_change_detect_objformat(conv_env, change, &error);
+ fail_unless(sourceformat != NULL, NULL);
+ osync_change_set_objformat(change, sourceformat);
+ osync_change_set_objtype(change, osync_objformat_get_objtype(sourceformat));
+
+ OSyncObjFormat *targetformat = NULL;
+ if (!strcmp(osync_objformat_get_name(sourceformat), "vtodo10"))
+ targetformat = osync_conv_find_objformat(conv_env, "vtodo20");
+
+ if (!strcmp(osync_objformat_get_name(sourceformat), "vtodo20"))
+ targetformat = osync_conv_find_objformat(conv_env, "vtodo10");
+
+ if (!strcmp(osync_objformat_get_name(sourceformat), "vevent10"))
+ targetformat = osync_conv_find_objformat(conv_env, "vevent20");
+
+ if (!strcmp(osync_objformat_get_name(sourceformat), "vevent20"))
+ targetformat = osync_conv_find_objformat(conv_env, "vevent10");
+
+ fail_unless(targetformat != NULL, NULL);
+
+ OSyncChange *newchange = osync_change_copy(change, &error);
+ fail_unless(newchange != NULL, NULL);
+
+ //Convert to
+ fail_unless(osync_change_convert(conv_env, change, targetformat, &error), NULL);
+
+ //Detect the output
+ osync_change_set_objformat_string(change, "plain");
+ fail_unless(osync_change_detect_objformat(conv_env, change, &error) == targetformat, NULL);
+
+ //Compare old to new
+ fail_unless(osync_change_compare(newchange, change) == CONV_DATA_SAME, NULL);
+
+ //Convert back
+ fail_unless(osync_change_convert(conv_env, change, sourceformat, &error), NULL);
+
+ //Detect the output again
+ osync_change_set_objformat_string(change, "plain");
+ fail_unless(osync_change_detect_objformat(conv_env, change, &error) == sourceformat, NULL);
+
+ //Compare again
+ fail_unless(osync_change_compare(newchange, change) == CONV_DATA_SAME, NULL);
+
+ osync_conv_env_free(conv_env);
+ osync_env_finalize(env, NULL);
+ osync_env_free(env);
+
+ destroy_testbed(testbed);
+}
+
+static void compare_vcal(const char *lfilename, const char *rfilename, OSyncConvCmpResult result)
+{
+ char *command1 = g_strdup_printf("cp %s/"OPENSYNC_TESTDATA"%s lfile", g_get_current_dir(), lfilename);
+ char *command2 = g_strdup_printf("cp %s/"OPENSYNC_TESTDATA"%s rfile", g_get_current_dir(), rfilename);
+ char *testbed = setup_testbed(NULL);
+ system(command1);
+ g_free(command1);
+ system(command2);
+ g_free(command2);
+
+ OSyncError *error = NULL;
+ OSyncEnv *env = init_env();
+
+ OSyncFormatEnv *conv_env = osync_conv_env_new(env);
+ fail_unless(conv_env != NULL, NULL);
+
+ char *buffer;
+ int size;
+
+ fail_unless(osync_file_read("lfile", &buffer, &size, &error), NULL);
+
+ OSyncChange *lchange = osync_change_new();
+ osync_change_set_uid(lchange, "lfile");
+ osync_change_set_data(lchange, buffer, size + 1, TRUE);
+ osync_change_set_conv_env(lchange, conv_env);
+ osync_change_set_objformat_string(lchange, "plain");
+
+ OSyncObjFormat *sourceformat = osync_change_detect_objformat(conv_env, lchange, &error);
+ fail_unless(sourceformat != NULL, NULL);
+ osync_change_set_objformat(lchange, sourceformat);
+ osync_change_set_objtype(lchange, osync_objformat_get_objtype(sourceformat));
+
+ fail_unless(osync_file_read("rfile", &buffer, &size, &error), NULL);
+
+ OSyncChange *rchange = osync_change_new();
+ osync_change_set_uid(rchange, "rfile");
+ osync_change_set_data(rchange, buffer, size + 1, TRUE);
+ osync_change_set_conv_env(rchange, conv_env);
+ osync_change_set_objformat_string(rchange, "plain");
+
+ sourceformat = osync_change_detect_objformat(conv_env, rchange, &error);
+ fail_unless(sourceformat != NULL, NULL);
+ osync_change_set_objformat(rchange, sourceformat);
+ osync_change_set_objtype(rchange, osync_objformat_get_objtype(sourceformat));
+
+ fail_unless(osync_change_compare(lchange, rchange) == result, NULL);
+
+ osync_conv_env_free(conv_env);
+ osync_env_finalize(env, NULL);
+ osync_env_free(env);
+ destroy_testbed(testbed);
+}
+
+static time_t vcal_get_revision(const char *filename)
+{
+ char *command = g_strdup_printf("cp %s/"OPENSYNC_TESTDATA"%s .", g_get_current_dir(), filename);
+ char *testbed = setup_testbed(NULL);
+ system(command);
+ g_free(command);
+
+
+ OSyncError *error = NULL;
+ OSyncEnv *env = init_env();
+
+ OSyncFormatEnv *conv_env = osync_conv_env_new(env);
+ fail_unless(conv_env != NULL, NULL);
+
+ char *buffer;
+ int size;
+
+ char *file = g_path_get_basename(filename);
+ fail_unless(osync_file_read(file, &buffer, &size, &error), NULL);
+
+ OSyncChange *change = osync_change_new();
+ osync_change_set_uid(change, file);
+ g_free(file);
+ osync_change_set_data(change, buffer, size + 1, TRUE);
+ osync_change_set_conv_env(change, conv_env);
+
+ osync_change_set_objformat_string(change, "plain");
+
+ OSyncObjFormat *sourceformat = osync_change_detect_objformat(conv_env, change, &error);
+ fail_unless(sourceformat != NULL, NULL);
+ osync_change_set_objformat(change, sourceformat);
+
+ OSyncObjFormat *targetformat = NULL;
+ if (!strcmp(osync_objformat_get_name(sourceformat), "vtodo10") || !strcmp(osync_objformat_get_name(sourceformat), "vtodo20"))
+ targetformat = osync_conv_find_objformat(conv_env, "xml-todo");
+
+ if (!strcmp(osync_objformat_get_name(sourceformat), "vevent10") || !strcmp(osync_objformat_get_name(sourceformat), "vevent20"))
+ targetformat = osync_conv_find_objformat(conv_env, "xml-event");
+
+ fail_unless(targetformat != NULL, NULL);
+
+ fail_unless(osync_change_convert_extension(conv_env, change, targetformat, "evolution", &error), NULL);
+
+ time_t time = osync_change_get_revision(change, &error);
+
+ osync_conv_env_free(conv_env);
+ osync_env_finalize(env, NULL);
+ osync_env_free(env);
+
+ destroy_testbed(testbed);
+ return time;
+}
+
+START_TEST (conv_vevent_evolution2_1hour)
+{
+ conv_vcal("data/vevents/evolution2/1-hour.vcf");
+}
+END_TEST
+
+START_TEST (conv_vevent_evolution2_1hour_alarm)
+{
+ conv_vcal("data/vevents/evolution2/1-hour-alarm.vcf");
+}
+END_TEST
+
+START_TEST (conv_vevent_evolution2_1hour_alarm2)
+{
+ conv_vcal("data/vevents/evolution2/1-hour-alarm2.vcf");
+}
+END_TEST
+
+START_TEST (conv_vevent_evolution2_all_day)
+{
+ conv_vcal("data/vevents/evolution2/all-day.vcf");
+}
+END_TEST
+
+START_TEST (conv_vevent_evolution2_all_day2)
+{
+ conv_vcal("data/vevents/evolution2/all-day2.vcf");
+}
+END_TEST
+
+START_TEST (conv_vevent_evolution2_free_busy)
+{
+ conv_vcal("data/vevents/evolution2/free-busy.vcf");
+}
+END_TEST
+
+START_TEST (conv_vevent_evolution2_full_special)
+{
+ conv_vcal("data/vevents/evolution2/full-special.vcf");
+}
+END_TEST
+START_TEST (conv_vevent_evolution2_rec_every_year)
+{
+ conv_vcal("data/vevents/evolution2/rec-every-year.vcf");
+}
+END_TEST
+
+START_TEST (conv_vevent_evolution2_rec_except)
+{
+ conv_vcal("data/vevents/evolution2/rec-except.vcf");
+}
+END_TEST
+
+START_TEST (conv_vevent_evolution2_rec_for)
+{
+ conv_vcal("data/vevents/evolution2/rec-for.vcf");
+}
+END_TEST
+
+START_TEST (conv_vevent_evolution2_rec_forever)
+{
+ conv_vcal("data/vevents/evolution2/rec-forever.vcf");
+}
+END_TEST
+
+START_TEST (conv_vevent_evolution2_rec_until)
+{
+ conv_vcal("data/vevents/evolution2/rec-until.vcf");
+}
+END_TEST
+
+START_TEST (conv_vevent_evolution2_rec_until2)
+{
+ conv_vcal("data/vevents/evolution2/evo2-recur-until.vcf");
+}
+END_TEST
+
+START_TEST (conv_vevent_kdepim_1hour_10)
+{
+ conv_vcal("data/vevents/kdepim/1-hour-1.0.vcs");
+}
+END_TEST
+
+START_TEST (conv_vevent_kdepim_1hour_20)
+{
+ conv_vcal("data/vevents/kdepim/1-hour-2.0.ics");
+}
+END_TEST
+
+START_TEST (cmp_vevent_1hour_1)
+{
+ compare_vcal("data/vevents/evolution2/1-hour.vcf", "data/vevents/kdepim/1-hour-1.0.vcs", CONV_DATA_SAME);
+}
+END_TEST
+
+START_TEST (cmp_vevent_1hour_2)
+{
+ compare_vcal("data/vevents/evolution2/1-hour.vcf", "data/vevents/kdepim/1-hour-2.0.ics", CONV_DATA_SAME);
+}
+END_TEST
+
+START_TEST (event_get_revision1)
+{
+ struct tm testtm = {2, 6, 11, 29, 3 - 1, 2005 - 1900, 0, 0, 0};
+ fail_unless(vcal_get_revision("data/vevents/evolution2/1-hour-alarm.vcf") == mktime(&testtm), NULL);
+}
+END_TEST
+
+START_TEST (event_get_revision2)
+{
+ struct tm testtm = {1, 8, 11, 29, 3 - 1, 2005 - 1900, 0, 0, 0};
+ fail_unless(vcal_get_revision("data/vevents/evolution2/1-hour-alarm2.vcf") == mktime(&testtm), NULL);
+}
+END_TEST
+
+START_TEST (event_get_revision3)
+{
+ struct tm testtm = {13, 5, 11, 29, 3 - 1, 2005 - 1900, 0, 0, 0};
+ fail_unless(vcal_get_revision("data/vevents/evolution2/1-hour.vcf") == mktime(&testtm), NULL);
+}
+END_TEST
+
+START_TEST (event_no_revision)
+{
+ fail_unless(vcal_get_revision("data/vevents/evolution2/all-day.vcf") == -1, NULL);
+}
+END_TEST
+
+
+START_TEST (conv_vtodo_evolution2_simple)
+{
+ conv_vcal("data/vtodos/evolution2/todo-simple.vcf");
+}
+END_TEST
+
+START_TEST (conv_vtodo_evolution2_full1)
+{
+ conv_vcal("data/vtodos/evolution2/todo-full1.vcf");
+}
+END_TEST
+
+START_TEST (conv_vtodo_evolution2_full2)
+{
+ conv_vcal("data/vtodos/evolution2/todo-full2.vcf");
+}
+END_TEST
+
+START_TEST (conv_vtodo_evolution2_full3)
+{
+ conv_vcal("data/vtodos/evolution2/todo-full3.vcf");
+}
+END_TEST
+
+START_TEST (conv_vtodo_evolution2_full4)
+{
+ conv_vcal("data/vtodos/evolution2/todo-full4.vcf");
+}
+END_TEST
+
+START_TEST (conv_vtodo_evolution2_full5)
+{
+ conv_vcal("data/vtodos/evolution2/todo-full5.vcf");
+}
+END_TEST
+
+START_TEST (conv_vtodo_evolution2_full6)
+{
+ conv_vcal("data/vtodos/evolution2/todo-full6.vcf");
+}
+END_TEST
+
+START_TEST (conv_vtodo_evolution2_full7)
+{
+ conv_vcal("data/vtodos/evolution2/todo-full7.vcf");
+}
+END_TEST
+
+START_TEST (todo_get_revision1)
+{
+ struct tm testtm = {50, 56, 0, 6, 3 - 1, 2005 - 1900, 0, 0, 0};
+ fail_unless(vcal_get_revision("data/vtodos/evolution2/todo-full1.vcf") == mktime(&testtm), NULL);
+}
+END_TEST
+
+START_TEST (todo_get_revision2)
+{
+ struct tm testtm = {50, 56, 0, 6, 3 - 1, 2005 - 1900, 0, 0, 0};
+ fail_unless(vcal_get_revision("data/vtodos/evolution2/todo-full2.vcf") == mktime(&testtm), NULL);
+}
+END_TEST
+
+START_TEST (todo_get_revision3)
+{
+ struct tm testtm = {0, 0, 0, 6, 3 - 1, 2005 - 1900, 0, 0, 0};
+ fail_unless(vcal_get_revision("data/vtodos/evolution2/todo-full3.vcf") == mktime(&testtm), NULL);
+}
+END_TEST
+
+START_TEST (todo_no_revision)
+{
+ fail_unless(vcal_get_revision("data/vtodos/kdepim/todo-full1.vcs") == -1, NULL);
+}
+END_TEST
+
+/*
+START_TEST (conv_test_crash)
+{
+ conv_vcal("data/vevents/crash.ics");
+}
+END_TEST
+*/
+START_TEST (conv_test_utf8_wrap)
+{
+ conv_vcal("data/vevents/utf8_wrap");
+}
+END_TEST
+
+START_TEST (conv_test_qp_wrap)
+{
+ conv_vcal("data/vevents/qp_wrap");
+}
+END_TEST
+
+Suite *vcal_suite(void)
+{
+ Suite *s = suite_create("VCal");
+ //Suite *s2 = suite_create("VCal");
+
+ create_case(s, "conv_vevent_evolution2_1hour", conv_vevent_evolution2_1hour);
+ create_case(s, "conv_vevent_evolution2_1hour_alarm", conv_vevent_evolution2_1hour_alarm);
+ create_case(s, "conv_vevent_evolution2_1hour_alarm2", conv_vevent_evolution2_1hour_alarm2);
+ create_case(s, "conv_vevent_evolution2_all_day", conv_vevent_evolution2_all_day);
+ create_case(s, "conv_vevent_evolution2_all_day2", conv_vevent_evolution2_all_day2);
+ create_case(s, "conv_vevent_evolution2_free_busy", conv_vevent_evolution2_free_busy);
+ create_case(s, "conv_vevent_evolution2_full_special", conv_vevent_evolution2_full_special);
+ create_case(s, "conv_vevent_evolution2_rec_every_year", conv_vevent_evolution2_rec_every_year);
+ create_case(s, "conv_vevent_evolution2_rec_except", conv_vevent_evolution2_rec_except);
+ create_case(s, "conv_vevent_evolution2_rec_for", conv_vevent_evolution2_rec_for);
+ create_case(s, "conv_vevent_evolution2_rec_forever", conv_vevent_evolution2_rec_forever);
+ create_case(s, "conv_vevent_evolution2_rec_until", conv_vevent_evolution2_rec_until);
+ create_case(s, "conv_vevent_evolution2_rec_until2", conv_vevent_evolution2_rec_until2);
+
+ create_case(s, "conv_vevent_kdepim_1hour_10", conv_vevent_kdepim_1hour_10);
+ create_case(s, "conv_vevent_kdepim_1hour_20", conv_vevent_kdepim_1hour_20);
+
+ create_case(s, "cmp_vevent_1hour_1", cmp_vevent_1hour_1);
+ create_case(s, "cmp_vevent_1hour_2", cmp_vevent_1hour_2);
+
+ create_case(s, "event_get_revision1", event_get_revision1);
+ create_case(s, "event_get_revision2", event_get_revision2);
+ create_case(s, "event_get_revision3", event_get_revision3);
+ create_case(s, "event_no_revision", event_no_revision);
+
+
+
+
+ create_case(s, "conv_vtodo_evolution2_simple", conv_vtodo_evolution2_simple);
+ create_case(s, "conv_vtodo_evolution2_full1", conv_vtodo_evolution2_full1);
+ create_case(s, "conv_vtodo_evolution2_full2", conv_vtodo_evolution2_full2);
+ create_case(s, "conv_vtodo_evolution2_full3", conv_vtodo_evolution2_full3);
+ create_case(s, "conv_vtodo_evolution2_full4", conv_vtodo_evolution2_full4);
+ create_case(s, "conv_vtodo_evolution2_full5", conv_vtodo_evolution2_full5);
+ create_case(s, "conv_vtodo_evolution2_full6", conv_vtodo_evolution2_full6);
+ create_case(s, "conv_vtodo_evolution2_full7", conv_vtodo_evolution2_full7);
+
+ create_case(s, "todo_get_revision1", todo_get_revision1);
+ create_case(s, "todo_get_revision2", todo_get_revision2);
+ create_case(s, "todo_get_revision3", todo_get_revision3);
+ create_case(s, "todo_no_revision", todo_no_revision);
+/* create_case(s, "conv_test_crash", conv_test_crash);*/
+ create_case(s, "conv_test_utf8_wrap", conv_test_utf8_wrap);
+ create_case(s, "conv_test_qp_wrap", conv_test_qp_wrap);
+
+
+
+ return s;
+}
+
+int main(void)
+{
+ int nf;
+
+ Suite *s = vcal_suite();
+
+ SRunner *sr;
+ sr = srunner_create(s);
+
+// srunner_set_fork_status (sr, CK_NOFORK);
+ srunner_run_all(sr, CK_NORMAL);
+ nf = srunner_ntests_failed(sr);
+ srunner_free(sr);
+ return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/debian/opensync/opensync-0.22/tests/check_vcard.c b/debian/opensync/opensync-0.22/tests/check_vcard.c
new file mode 100644
index 00000000..1759512f
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/check_vcard.c
@@ -0,0 +1,456 @@
+#include "support.h"
+#include <time.h>
+
+static void conv_vcard(const char *filename, const char *extension)
+{
+ char *command = g_strdup_printf("cp %s/"OPENSYNC_TESTDATA"%s .", g_get_current_dir(), filename);
+ char *testbed = setup_testbed(NULL);
+ system(command);
+ g_free(command);
+
+
+ OSyncError *error = NULL;
+ OSyncEnv *env = init_env();
+
+ OSyncFormatEnv *conv_env = osync_conv_env_new(env);
+ fail_unless(conv_env != NULL, NULL);
+
+ char *buffer;
+ int size;
+
+ char *file = g_path_get_basename(filename);
+ fail_unless(osync_file_read(file, &buffer, &size, &error), NULL);
+
+ OSyncChange *change = osync_change_new();
+ osync_change_set_uid(change, file);
+ g_free(file);
+ osync_change_set_data(change, buffer, size + 1, TRUE);
+ osync_change_set_conv_env(change, conv_env);
+
+ osync_change_set_objformat_string(change, "plain");
+
+ OSyncObjFormat *sourceformat = osync_change_detect_objformat(conv_env, change, &error);
+ fail_unless(sourceformat != NULL, NULL);
+ osync_change_set_objformat(change, sourceformat);
+ osync_change_set_objtype(change, osync_objformat_get_objtype(sourceformat));
+
+ OSyncObjFormat *targetformat = NULL;
+ if (!strcmp(osync_objformat_get_name(sourceformat), "vcard21"))
+ targetformat = osync_conv_find_objformat(conv_env, "vcard30");
+
+ if (!strcmp(osync_objformat_get_name(sourceformat), "vcard30"))
+ targetformat = osync_conv_find_objformat(conv_env, "vcard21");
+
+ fail_unless(targetformat != NULL, NULL);
+
+ OSyncChange *newchange = osync_change_copy(change, &error);
+ fail_unless(newchange != NULL, NULL);
+
+ //Convert to
+ fail_unless(osync_change_convert_extension(conv_env, change, targetformat, extension, &error), NULL);
+
+ //Detect the output
+ osync_change_set_objformat_string(change, "plain");
+ fail_unless(osync_change_detect_objformat(conv_env, change, &error) == targetformat, NULL);
+
+ //Compare old to new
+ fail_unless(osync_change_compare(newchange, change) == CONV_DATA_SAME, NULL);
+
+ //Convert back
+ fail_unless(osync_change_convert_extension(conv_env, change, sourceformat, extension, &error), NULL);
+
+ //Detect the output again
+ osync_change_set_objformat_string(change, "plain");
+ fail_unless(osync_change_detect_objformat(conv_env, change, &error) == sourceformat, NULL);
+
+ //Compare again
+ fail_unless(osync_change_compare(newchange, change) == CONV_DATA_SAME, NULL);
+
+ osync_conv_env_free(conv_env);
+ osync_env_finalize(env, NULL);
+ osync_env_free(env);
+
+ destroy_testbed(testbed);
+}
+
+static void compare_vcard(const char *lfilename, const char *rfilename, OSyncConvCmpResult result)
+{
+ char *command1 = g_strdup_printf("cp %s/"OPENSYNC_TESTDATA"%s lfile", g_get_current_dir(), lfilename);
+ char *command2 = g_strdup_printf("cp %s/"OPENSYNC_TESTDATA"%s rfile", g_get_current_dir(), rfilename);
+ char *testbed = setup_testbed(NULL);
+ system(command1);
+ g_free(command1);
+ system(command2);
+ g_free(command2);
+
+ OSyncError *error = NULL;
+ OSyncEnv *env = init_env();
+
+ OSyncFormatEnv *conv_env = osync_conv_env_new(env);
+ fail_unless(conv_env != NULL, NULL);
+
+ char *buffer;
+ int size;
+
+ fail_unless(osync_file_read("lfile", &buffer, &size, &error), NULL);
+
+ OSyncChange *lchange = osync_change_new();
+ osync_change_set_uid(lchange, "lfile");
+ osync_change_set_data(lchange, buffer, size + 1, TRUE);
+ osync_change_set_conv_env(lchange, conv_env);
+ osync_change_set_objformat_string(lchange, "plain");
+
+ OSyncObjFormat *sourceformat = osync_change_detect_objformat(conv_env, lchange, &error);
+ fail_unless(sourceformat != NULL, NULL);
+ osync_change_set_objformat(lchange, sourceformat);
+ osync_change_set_objtype(lchange, osync_objformat_get_objtype(sourceformat));
+
+ fail_unless(osync_file_read("rfile", &buffer, &size, &error), NULL);
+
+ OSyncChange *rchange = osync_change_new();
+ osync_change_set_uid(rchange, "rfile");
+ osync_change_set_data(rchange, buffer, size + 1, TRUE);
+ osync_change_set_conv_env(rchange, conv_env);
+ osync_change_set_objformat_string(rchange, "plain");
+
+ sourceformat = osync_change_detect_objformat(conv_env, rchange, &error);
+ fail_unless(sourceformat != NULL, NULL);
+ osync_change_set_objformat(rchange, sourceformat);
+ osync_change_set_objtype(rchange, osync_objformat_get_objtype(sourceformat));
+
+ fail_unless(osync_change_compare(lchange, rchange) == result, NULL);
+
+ osync_conv_env_free(conv_env);
+ osync_env_finalize(env, NULL);
+ osync_env_free(env);
+ destroy_testbed(testbed);
+}
+
+static time_t vcard_get_revision(const char *filename)
+{
+ char *command = g_strdup_printf("cp %s/"OPENSYNC_TESTDATA"%s .", g_get_current_dir(), filename);
+ char *testbed = setup_testbed(NULL);
+ system(command);
+ g_free(command);
+
+
+ OSyncError *error = NULL;
+ OSyncEnv *env = init_env();
+
+ OSyncFormatEnv *conv_env = osync_conv_env_new(env);
+ fail_unless(conv_env != NULL, NULL);
+
+ char *buffer;
+ int size;
+
+ char *file = g_path_get_basename(filename);
+ fail_unless(osync_file_read(file, &buffer, &size, &error), NULL);
+
+ OSyncChange *change = osync_change_new();
+ osync_change_set_uid(change, file);
+ g_free(file);
+ osync_change_set_data(change, buffer, size + 1, TRUE);
+ osync_change_set_conv_env(change, conv_env);
+
+ osync_change_set_objformat_string(change, "plain");
+
+ OSyncObjFormat *sourceformat = osync_change_detect_objformat(conv_env, change, &error);
+ fail_unless(sourceformat != NULL, NULL);
+ osync_change_set_objformat(change, sourceformat);
+
+ OSyncObjFormat *targetformat = osync_conv_find_objformat(conv_env, "xml-contact");
+ fail_unless(targetformat != NULL, NULL);
+
+ fail_unless(osync_change_convert_extension(conv_env, change, targetformat, "evolution", &error), NULL);
+
+ time_t time = osync_change_get_revision(change, &error);
+
+ osync_conv_env_free(conv_env);
+ osync_env_finalize(env, NULL);
+ osync_env_free(env);
+
+ destroy_testbed(testbed);
+ return time;
+}
+
+START_TEST (conv_vcard_evolution2_full1)
+{
+ conv_vcard("data/vcards/evolution2/evo2-full1.vcf", "evolution");
+}
+END_TEST
+
+START_TEST (conv_vcard_evolution2_full2)
+{
+ conv_vcard("data/vcards/evolution2/evo2-full2.vcf", "evolution");
+}
+END_TEST
+
+START_TEST (conv_vcard_evolution2_photo)
+{
+ conv_vcard("data/vcards/evolution2/evo2-photo.vcf", "evolution");
+}
+END_TEST
+
+START_TEST (conv_vcard_evolution2_multiline)
+{
+ conv_vcard("data/vcards/evolution2/evo2-multiline.vcf", "evolution");
+}
+END_TEST
+
+START_TEST (conv_vcard_evolution2_umlaute)
+{
+ conv_vcard("data/vcards/evolution2/evo2-umlaute.vcf", "evolution");
+}
+END_TEST
+
+START_TEST (conv_vcard_evolution2_special)
+{
+ conv_vcard("data/vcards/evolution2/evo2-special.vcf", "evolution");
+}
+END_TEST
+
+START_TEST (conv_vcard_kde_21_full1)
+{
+ conv_vcard("data/vcards/kdepim/kdepim-full1-2.1.vcf", "kde");
+}
+END_TEST
+
+START_TEST (conv_vcard_kde_30_full1)
+{
+ conv_vcard("data/vcards/kdepim/kdepim-full1-3.0.vcf", "kde");
+}
+END_TEST
+
+START_TEST (conv_vcard_kde_21_full2)
+{
+ conv_vcard("data/vcards/kdepim/kdepim-full2-2.1.vcf", "kde");
+}
+END_TEST
+
+START_TEST (conv_vcard_kde_30_full2)
+{
+ conv_vcard("data/vcards/kdepim/kdepim-full2-3.0.vcf", "kde");
+}
+END_TEST
+
+START_TEST (conv_vcard_kde_21_multiline)
+{
+ conv_vcard("data/vcards/kdepim/kdepim-multiline-2.1.vcf", "kde");
+}
+END_TEST
+
+START_TEST (conv_vcard_kde_30_multiline)
+{
+ conv_vcard("data/vcards/kdepim/kdepim-multiline-3.0.vcf", "kde");
+}
+END_TEST
+
+START_TEST (conv_vcard_kde_21_photo1)
+{
+ conv_vcard("data/vcards/kdepim/kdepim-photo1-2.1.vcf", "kde");
+}
+END_TEST
+
+START_TEST (conv_vcard_kde_30_photo1)
+{
+ conv_vcard("data/vcards/kdepim/kdepim-photo1-3.0.vcf", "kde");
+}
+END_TEST
+
+START_TEST (conv_vcard_kde_21_photo2)
+{
+ conv_vcard("data/vcards/kdepim/kdepim-photo2-2.1.vcf", "kde");
+}
+END_TEST
+
+START_TEST (conv_vcard_kde_30_photo2)
+{
+ conv_vcard("data/vcards/kdepim/kdepim-photo2-3.0.vcf", "kde");
+}
+END_TEST
+
+START_TEST (conv_vcard_kde_21_sound1)
+{
+ conv_vcard("data/vcards/kdepim/kdepim-sound1-2.1.vcf", "kde");
+}
+END_TEST
+
+START_TEST (conv_vcard_kde_30_sound1)
+{
+ conv_vcard("data/vcards/kdepim/kdepim-sound1-3.0.vcf", "kde");
+}
+END_TEST
+
+START_TEST (conv_vcard_kde_21_sound2)
+{
+ conv_vcard("data/vcards/kdepim/kdepim-sound2-2.1.vcf", "kde");
+}
+END_TEST
+
+START_TEST (conv_vcard_kde_30_sound2)
+{
+ conv_vcard("data/vcards/kdepim/kdepim-sound2-3.0.vcf", "kde");
+}
+END_TEST
+
+START_TEST (conv_vcard_kde_21_special)
+{
+ conv_vcard("data/vcards/kdepim/kdepim-special-2.1.vcf", "kde");
+}
+END_TEST
+
+START_TEST (conv_vcard_kde_30_special)
+{
+ conv_vcard("data/vcards/kdepim/kdepim-special-3.0.vcf", "kde");
+}
+END_TEST
+
+START_TEST (conv_vcard_kde_21_umlaute)
+{
+ conv_vcard("data/vcards/kdepim/kdepim-umlaute-2.1.vcf", "kde");
+}
+END_TEST
+
+START_TEST (conv_vcard_kde_30_umlaute)
+{
+ conv_vcard("data/vcards/kdepim/kdepim-umlaute-3.0.vcf", "kde");
+}
+END_TEST
+
+START_TEST (conv_vcard_malformed)
+{
+ conv_vcard("data/vcards/malformed.vcf", "kde");
+}
+END_TEST
+
+START_TEST (compare_vformat_mismatch1)
+{
+ compare_vcard("data/vcards/evolution2/compare/1-different.vcf", "data/vcards/kdepim/compare/1-different.vcf", CONV_DATA_MISMATCH);
+}
+END_TEST
+
+START_TEST (compare_vformat_similar1)
+{
+ compare_vcard("data/vcards/evolution2/compare/1-conflict.vcf", "data/vcards/kdepim/compare/1-conflict.vcf", CONV_DATA_SIMILAR);
+}
+END_TEST
+
+START_TEST (compare_vformat_mismatch2)
+{
+ compare_vcard("data/vcards/evolution2/compare/2-conflict.vcf", "data/vcards/kdepim/compare/2-conflict.vcf", CONV_DATA_MISMATCH);
+}
+END_TEST
+
+START_TEST (compare_vformat_similar2)
+{
+ compare_vcard("data/vcards/evolution2/compare/2-different.vcf", "data/vcards/kdepim/compare/2-different.vcf", CONV_DATA_SIMILAR);
+}
+END_TEST
+
+START_TEST (compare_vformat_same1)
+{
+ compare_vcard("data/vcards/evolution2/compare/1-same.vcf", "data/vcards/kdepim/compare/1-same.vcf", CONV_DATA_SAME);
+}
+END_TEST
+
+START_TEST (compare_vformat_same2)
+{
+ compare_vcard("data/vcards/evolution2/compare/2-same.vcf", "data/vcards/kdepim/compare/2-same.vcf", CONV_DATA_SAME);
+}
+END_TEST
+
+START_TEST (get_revision1)
+{
+ struct tm testtm = {24, 41, 10, 26, 2 - 1, 2005 - 1900, 0, 0, 0};
+ fail_unless(vcard_get_revision("data/vcards/evolution2/evo2-full1.vcf") == mktime(&testtm), NULL);
+}
+END_TEST
+
+START_TEST (get_revision2)
+{
+ struct tm testtm = {0, 0, 0, 26, 2 - 1, 2005 - 1900, 0, 0, 0};
+ fail_unless(vcard_get_revision("data/vcards/evolution2/evo2-full2.vcf") == mktime(&testtm), NULL);
+}
+END_TEST
+
+START_TEST (get_revision3)
+{
+ struct tm testtm = {0, 0, 0, 26, 2 - 1, 2005 - 1900, 0, 0, 0};
+ fail_unless(vcard_get_revision("data/vcards/evolution2/evo2-multiline.vcf") == mktime(&testtm), NULL);
+}
+END_TEST
+
+START_TEST (get_revision4)
+{
+ struct tm testtm = {24, 41, 10, 26, 2 - 1, 2005 - 1900, 0, 0, 0};
+ fail_unless(vcard_get_revision("data/vcards/evolution2/evo2-photo.vcf") == mktime(&testtm), NULL);
+}
+END_TEST
+
+START_TEST (get_no_revision)
+{
+ fail_unless(vcard_get_revision("data/vcards/evolution2/compare/1-same.vcf") == -1, NULL);
+}
+END_TEST
+
+Suite *vcard_suite(void)
+{
+ Suite *s = suite_create("Vcard");
+ //Suite *s2 = suite_create("Vcard");
+
+ create_case(s, "conv_vcard_evolution2_full1", conv_vcard_evolution2_full1);
+ create_case(s, "conv_vcard_evolution2_full2", conv_vcard_evolution2_full2);
+ create_case(s, "conv_vcard_evolution2_photo", conv_vcard_evolution2_photo);
+ create_case(s, "conv_vcard_evolution2_multiline", conv_vcard_evolution2_multiline);
+ create_case(s, "conv_vcard_evolution2_umlaute", conv_vcard_evolution2_umlaute);
+ create_case(s, "conv_vcard_evolution2_special", conv_vcard_evolution2_special);
+
+ create_case(s, "conv_vcard_kde_21_full1", conv_vcard_kde_21_full1);
+ create_case(s, "conv_vcard_kde_30_full1", conv_vcard_kde_30_full1);
+ create_case(s, "conv_vcard_kde_21_full2", conv_vcard_kde_21_full2);
+ create_case(s, "conv_vcard_kde_30_full2", conv_vcard_kde_30_full2);
+ create_case(s, "conv_vcard_kde_21_multiline", conv_vcard_kde_21_multiline);
+ create_case(s, "conv_vcard_kde_30_multiline", conv_vcard_kde_30_multiline);
+ create_case(s, "conv_vcard_kde_21_photo1", conv_vcard_kde_21_photo1);
+ create_case(s, "conv_vcard_kde_30_photo1", conv_vcard_kde_30_photo1);
+ create_case(s, "conv_vcard_kde_21_photo2", conv_vcard_kde_21_photo2);
+ create_case(s, "conv_vcard_kde_30_photo2", conv_vcard_kde_30_photo2);
+ create_case(s, "conv_vcard_kde_21_sound1", conv_vcard_kde_21_sound1);
+ create_case(s, "conv_vcard_kde_30_sound1", conv_vcard_kde_30_sound1);
+ create_case(s, "conv_vcard_kde_21_sound2", conv_vcard_kde_21_sound2);
+ create_case(s, "conv_vcard_kde_30_sound2", conv_vcard_kde_30_sound2);
+ create_case(s, "conv_vcard_kde_21_special", conv_vcard_kde_21_special);
+ create_case(s, "conv_vcard_kde_30_special", conv_vcard_kde_30_special);
+ create_case(s, "conv_vcard_kde_21_umlaute", conv_vcard_kde_21_umlaute);
+ create_case(s, "conv_vcard_kde_30_umlaute", conv_vcard_kde_30_umlaute);
+ create_case(s, "conv_vcard_malformed", conv_vcard_malformed);
+ create_case(s, "compare_vformat_mismatch1", compare_vformat_mismatch1);
+ create_case(s, "compare_vformat_mismatch2", compare_vformat_mismatch2);
+ create_case(s, "compare_vformat_similar1", compare_vformat_similar1);
+ create_case(s, "compare_vformat_similar2", compare_vformat_similar2);
+ create_case(s, "compare_vformat_same1", compare_vformat_same1);
+ create_case(s, "compare_vformat_same2", compare_vformat_same2);
+
+ create_case(s, "get_revision1", get_revision1);
+ create_case(s, "get_revision2", get_revision2);
+ create_case(s, "get_revision3", get_revision3);
+ create_case(s, "get_revision4", get_revision4);
+ create_case(s, "get_no_revision", get_no_revision);
+
+ return s;
+}
+
+int main(void)
+{
+ int nf;
+
+ Suite *s = vcard_suite();
+ SRunner *sr;
+ sr = srunner_create(s);
+
+// srunner_set_fork_status (sr, CK_NOFORK);
+ srunner_run_all(sr, CK_NORMAL);
+ nf = srunner_ntests_failed(sr);
+ srunner_free(sr);
+ return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/debian/opensync/opensync-0.22/tests/check_vnote.c b/debian/opensync/opensync-0.22/tests/check_vnote.c
new file mode 100644
index 00000000..3ba87834
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/check_vnote.c
@@ -0,0 +1,284 @@
+#include "support.h"
+#include <time.h>
+
+static void conv_vnote(const char *filename)
+{
+ char *command = g_strdup_printf("cp %s/"OPENSYNC_TESTDATA"%s .", g_get_current_dir(), filename);
+ char *testbed = setup_testbed(NULL);
+ system(command);
+ g_free(command);
+
+
+ OSyncError *error = NULL;
+ OSyncEnv *env = init_env();
+
+ OSyncFormatEnv *conv_env = osync_conv_env_new(env);
+ fail_unless(conv_env != NULL, NULL);
+
+ char *buffer;
+ int size;
+
+ char *file = g_path_get_basename(filename);
+ fail_unless(osync_file_read(file, &buffer, &size, &error), NULL);
+
+ OSyncChange *change = osync_change_new();
+ osync_change_set_uid(change, file);
+ osync_change_set_data(change, buffer, size + 1, TRUE);
+ osync_change_set_conv_env(change, conv_env);
+
+ osync_change_set_objformat_string(change, "plain");
+
+ OSyncObjFormat *sourceformat = osync_change_detect_objformat(conv_env, change, &error);
+ fail_unless(sourceformat != NULL, NULL);
+ osync_change_set_objformat(change, sourceformat);
+ osync_change_set_objtype(change, osync_objformat_get_objtype(sourceformat));
+
+ OSyncObjFormat *targetformat = osync_conv_find_objformat(conv_env, "xml-note");
+ fail_unless(targetformat != NULL, NULL);
+
+ OSyncChange *newchange = osync_change_copy(change, &error);
+ fail_unless(newchange != NULL, NULL);
+
+ //Convert to
+ fail_unless(osync_change_convert(conv_env, change, targetformat, &error), NULL);
+
+ //Compare old to new
+ fail_unless(osync_change_compare(newchange, change) == CONV_DATA_SAME, NULL);
+
+ //Convert back
+ fail_unless(osync_change_convert(conv_env, change, sourceformat, &error), NULL);
+
+ //Detect the output again
+ osync_change_set_objformat_string(change, "plain");
+ fail_unless(osync_change_detect_objformat(conv_env, change, &error) == sourceformat, NULL);
+
+ //Compare again
+ fail_unless(osync_change_compare(newchange, change) == CONV_DATA_SAME, NULL);
+
+ osync_conv_env_free(conv_env);
+ osync_env_finalize(env, NULL);
+ osync_env_free(env);
+
+ destroy_testbed(testbed);
+}
+
+static void compare_vnote(const char *lfilename, const char *rfilename, OSyncConvCmpResult result)
+{
+ char *command1 = g_strdup_printf("cp %s/"OPENSYNC_TESTDATA"%s lfile", g_get_current_dir(), lfilename);
+ char *command2 = g_strdup_printf("cp %s/"OPENSYNC_TESTDATA"%s rfile", g_get_current_dir(), rfilename);
+ char *testbed = setup_testbed(NULL);
+ system(command1);
+ g_free(command1);
+ system(command2);
+ g_free(command2);
+
+ OSyncError *error = NULL;
+ OSyncEnv *env = init_env();
+
+ OSyncFormatEnv *conv_env = osync_conv_env_new(env);
+ fail_unless(conv_env != NULL, NULL);
+
+ char *buffer;
+ int size;
+
+ fail_unless(osync_file_read("lfile", &buffer, &size, &error), NULL);
+
+ OSyncChange *lchange = osync_change_new();
+ osync_change_set_uid(lchange, "lfile");
+ osync_change_set_data(lchange, buffer, size + 1, TRUE);
+ osync_change_set_conv_env(lchange, conv_env);
+ osync_change_set_objformat_string(lchange, "plain");
+
+ OSyncObjFormat *sourceformat = osync_change_detect_objformat(conv_env, lchange, &error);
+ fail_unless(sourceformat != NULL, NULL);
+ osync_change_set_objformat(lchange, sourceformat);
+ osync_change_set_objtype(lchange, osync_objformat_get_objtype(sourceformat));
+
+ fail_unless(osync_file_read("rfile", &buffer, &size, &error), NULL);
+
+ OSyncChange *rchange = osync_change_new();
+ osync_change_set_uid(rchange, "rfile");
+ osync_change_set_data(rchange, buffer, size + 1, TRUE);
+ osync_change_set_conv_env(rchange, conv_env);
+ osync_change_set_objformat_string(rchange, "plain");
+
+ sourceformat = osync_change_detect_objformat(conv_env, rchange, &error);
+ fail_unless(sourceformat != NULL, NULL);
+ osync_change_set_objformat(rchange, sourceformat);
+ osync_change_set_objtype(rchange, osync_objformat_get_objtype(sourceformat));
+
+ fail_unless(osync_change_compare(lchange, rchange) == result, NULL);
+
+ osync_conv_env_free(conv_env);
+ osync_env_finalize(env, NULL);
+ osync_env_free(env);
+ destroy_testbed(testbed);
+}
+
+static time_t vnote_get_revision(const char *filename)
+{
+ char *command = g_strdup_printf("cp %s/"OPENSYNC_TESTDATA"%s .", g_get_current_dir(), filename);
+ char *testbed = setup_testbed(NULL);
+ system(command);
+ g_free(command);
+
+
+ OSyncError *error = NULL;
+ OSyncEnv *env = init_env();
+
+ OSyncFormatEnv *conv_env = osync_conv_env_new(env);
+ fail_unless(conv_env != NULL, NULL);
+
+ char *buffer;
+ int size;
+
+ char *file = g_path_get_basename(filename);
+ fail_unless(osync_file_read(file, &buffer, &size, &error), NULL);
+
+ OSyncChange *change = osync_change_new();
+ osync_change_set_uid(change, file);
+ g_free(file);
+ osync_change_set_data(change, buffer, size + 1, TRUE);
+ osync_change_set_conv_env(change, conv_env);
+
+ osync_change_set_objformat_string(change, "plain");
+
+ OSyncObjFormat *sourceformat = osync_change_detect_objformat(conv_env, change, &error);
+ fail_unless(sourceformat != NULL, NULL);
+ osync_change_set_objformat(change, sourceformat);
+
+ OSyncObjFormat *targetformat = osync_conv_find_objformat(conv_env, "xml-note");
+ fail_unless(targetformat != NULL, NULL);
+
+ fail_unless(osync_change_convert(conv_env, change, targetformat, &error), NULL);
+
+ time_t time = osync_change_get_revision(change, &error);
+
+ osync_conv_env_free(conv_env);
+ osync_env_finalize(env, NULL);
+ osync_env_free(env);
+
+ destroy_testbed(testbed);
+ return time;
+}
+
+START_TEST (conv_vnote1)
+{
+ conv_vnote("data/vnotes/vnote1.vnt");
+}
+END_TEST
+
+START_TEST (conv_vnote2)
+{
+ conv_vnote("data/vnotes/vnote2.vnt");
+}
+END_TEST
+
+START_TEST (conv_vnote3)
+{
+ conv_vnote("data/vnotes/vnote3.vnt");
+}
+END_TEST
+
+START_TEST (conv_vnote_minimal)
+{
+ conv_vnote("data/vnotes/vnote-minimal.vnt");
+}
+END_TEST
+
+START_TEST (get_revision1)
+{
+ struct tm testtm = {0, 0, 0, 6, 4 - 1, 2005 - 1900, 0, 0, 0};
+ fail_unless(vnote_get_revision("data/vnotes/vnote1.vnt") == mktime(&testtm), NULL);
+}
+END_TEST
+
+START_TEST (get_revision2)
+{
+ struct tm testtm = {1, 1, 1, 6, 4 - 1, 2005 - 1900, 0, 0, 0};
+ fail_unless(vnote_get_revision("data/vnotes/vnote2.vnt") == mktime(&testtm), NULL);
+}
+END_TEST
+
+START_TEST (get_revision3)
+{
+ struct tm testtm = {0, 0, 0, 6, 4 - 1, 2005 - 1900, 0, 0, 0};
+ fail_unless(vnote_get_revision("data/vnotes/vnote3.vnt") == mktime(&testtm), NULL);
+}
+END_TEST
+
+START_TEST (get_revision4)
+{
+ fail_unless(vnote_get_revision("data/vnotes/vnote-minimal.vnt") == -1, NULL);
+}
+END_TEST
+
+START_TEST (compare_vnote_same1)
+{
+ compare_vnote("data/vnotes/vnote1.vnt", "data/vnotes/vnote1.vnt", CONV_DATA_SAME);
+}
+END_TEST
+
+START_TEST (compare_vnote_same2)
+{
+ compare_vnote("data/vnotes/vnote1.vnt", "data/vnotes/vnote1-same.vnt", CONV_DATA_SAME);
+}
+END_TEST
+
+START_TEST (compare_vnote_similar1)
+{
+ compare_vnote("data/vnotes/vnote1.vnt", "data/vnotes/vnote1-similar.vnt", CONV_DATA_SIMILAR);
+}
+END_TEST
+
+START_TEST (compare_vnote_mismatch1)
+{
+ compare_vnote("data/vnotes/vnote1.vnt", "data/vnotes/vnote2.vnt", CONV_DATA_MISMATCH);
+}
+END_TEST
+
+START_TEST (compare_vnote_mismatch2)
+{
+ compare_vnote("data/vnotes/vnote1.vnt", "data/vnotes/vnote-minimal.vnt", CONV_DATA_MISMATCH);
+}
+END_TEST
+
+Suite *vnote_suite(void)
+{
+ Suite *s = suite_create("VNote");
+ //Suite *s2 = suite_create("VNote");
+
+ create_case(s, "conv_vnote1", conv_vnote1);
+ create_case(s, "conv_vnote2", conv_vnote2);
+ create_case(s, "conv_vnote3", conv_vnote3);
+ create_case(s, "conv_vnote_minimal", conv_vnote_minimal);
+
+ create_case(s, "get_revision1", get_revision1);
+ create_case(s, "get_revision2", get_revision2);
+ create_case(s, "get_revision3", get_revision3);
+ create_case(s, "get_revision4", get_revision4);
+
+ create_case(s, "compare_vnote_same1", compare_vnote_same1);
+ create_case(s, "compare_vnote_same2", compare_vnote_same2);
+ create_case(s, "compare_vnote_similar1", compare_vnote_similar1);
+ create_case(s, "compare_vnote_mismatch1", compare_vnote_mismatch1);
+ create_case(s, "compare_vnote_mismatch2", compare_vnote_mismatch2);
+
+ return s;
+}
+
+int main(void)
+{
+ int nf;
+
+ Suite *s = vnote_suite();
+
+ SRunner *sr;
+ sr = srunner_create(s);
+
+// srunner_set_fork_status (sr, CK_NOFORK);
+ srunner_run_all(sr, CK_NORMAL);
+ nf = srunner_ntests_failed(sr);
+ srunner_free(sr);
+ return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/1/anchor.db b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/1/anchor.db
new file mode 100644
index 00000000..612b966c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/1/anchor.db
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/1/file-sync.conf
new file mode 100644
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/1/hash.db b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/1/hash.db
new file mode 100644
index 00000000..2b6682f1
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/1/hash.db
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/1/syncmember.conf
new file mode 100644
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/2/file-sync.conf
new file mode 100644
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/2/hash.db b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/2/hash.db
new file mode 100644
index 00000000..216537f8
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/2/hash.db
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/2/syncmember.conf
new file mode 100644
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/change.db b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/change.db
new file mode 100644
index 00000000..8e09854a
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/change.db
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/syncgroup.conf
new file mode 100644
index 00000000..481b4dee
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><filter><destobjtype>data</destobjtype><action>1</action></filter><groupname>kdefile</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/data1/file b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/data1/file
new file mode 100644
index 00000000..d383c56f
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/data1/file
@@ -0,0 +1 @@
+testdata
diff --git a/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/data1/file2 b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/data1/file2
new file mode 100644
index 00000000..00b728c3
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/data1/file2
@@ -0,0 +1 @@
+testedata2
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/data1/testdata b/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/data2/testdata2 b/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/data2/testdata2
new file mode 100644
index 00000000..f18b75a6
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/data2/testdata2
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/data1/testdata b/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/data2/testdata2 b/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/data2/testdata2
new file mode 100644
index 00000000..f18b75a6
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/data2/testdata2
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/data1/testdata b/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/data1/testdata2 b/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/data1/testdata2
new file mode 100644
index 00000000..f18b75a6
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/data1/testdata2
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/data1/vcard.vcf b/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/data1/vcard.vcf
new file mode 100644
index 00000000..91e01190
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/data1/vcard.vcf
@@ -0,0 +1,11 @@
+BEGIN:VCARD
+VERSION:2.1
+X-EVOLUTION-FILE-AS:Multisync
+FN:Multisync
+N:;Multisync
+EMAIL;INTERNET:multisync-users@lists.sourceforge.net
+X-EVOLUTION-LAST-USE:2003-11-26
+X-EVOLUTION-USE-SCORE:5.891888
+UID:pas-id-3F1D9AC000000001
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/data2/testdata3 b/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/data2/testdata3
new file mode 100644
index 00000000..88b7bc39
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/data2/testdata3
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/3/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/3/file-sync.conf
new file mode 100755
index 00000000..c5990aa2
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/3/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data3</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/3/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/3/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/3/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/data1/testdata b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/newdata b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/newdata
new file mode 100644
index 00000000..e7dde4c8
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/newdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/newdata2 b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/newdata2
new file mode 100644
index 00000000..61628870
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/newdata2
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/3/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/3/file-sync.conf
new file mode 100755
index 00000000..c5990aa2
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/3/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data3</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/3/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/3/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/3/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/data1/testdata b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/data2/testdata b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/data2/testdata
new file mode 100644
index 00000000..1ba3e340
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/data2/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/3/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/3/file-sync.conf
new file mode 100755
index 00000000..c5990aa2
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/3/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data3</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/3/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/3/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/3/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/data1/testdata b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/data2/testdata b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/data2/testdata
new file mode 100644
index 00000000..1ba3e340
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/data2/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/data3/testdata b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/data3/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/data3/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/3/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/3/file-sync.conf
new file mode 100755
index 00000000..c5990aa2
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/3/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data3</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/3/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/3/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/3/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/data1/testdata b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/data2/testdata b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/data2/testdata
new file mode 100644
index 00000000..e7dde4c8
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/data2/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/data3/testdata b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/data3/testdata
new file mode 100644
index 00000000..61628870
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/data3/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/3/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/3/file-sync.conf
new file mode 100755
index 00000000..c5990aa2
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/3/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data3</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/3/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/3/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/3/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/data1/testdata b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata
new file mode 100644
index 00000000..30895eae
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata1 b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata1
new file mode 100644
index 00000000..9b4118f8
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata1
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata2 b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata2
new file mode 100644
index 00000000..05758207
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata2
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata3 b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata3
new file mode 100644
index 00000000..a4a7f801
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata3
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata4 b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata4
new file mode 100644
index 00000000..93627682
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata4
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata5 b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata5
new file mode 100644
index 00000000..72091685
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata5
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/3/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/3/file-sync.conf
new file mode 100755
index 00000000..c5990aa2
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/3/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data3</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/3/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/3/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/3/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/data1/testdata b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/data2/testdata b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/data2/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/data2/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/3/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/3/file-sync.conf
new file mode 100755
index 00000000..c5990aa2
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/3/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data3</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/3/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/3/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/3/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/data1/testdata b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/data2/testdata b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/data2/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/data2/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/data3/testdata b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/data3/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/data3/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/plugin_no_config/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/plugin_no_config/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/plugin_no_config/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/plugin_no_config/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/plugin_no_config/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/plugin_no_config/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/plugin_no_config/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/plugin_no_config/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/plugin_no_config/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/plugin_no_config/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/plugin_no_config/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/plugin_no_config/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/data1/testdata b/debian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/data1/testdata b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/data2/testdata b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/data2/testdata
new file mode 100755
index 00000000..5425b0f7
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/data2/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/data2/testdata-dupe b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/data2/testdata-dupe
new file mode 100644
index 00000000..a63f373f
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/data2/testdata-dupe
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/comp_data/testdata b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/comp_data/testdata
new file mode 100755
index 00000000..5425b0f7
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/comp_data/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/data1/testdata b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/new_data b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/new_data
new file mode 100755
index 00000000..5425b0f7
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/new_data
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/comp_data/testdata b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/comp_data/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/comp_data/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/data1/testdata b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/data2/testdata b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/data2/testdata
new file mode 100755
index 00000000..5425b0f7
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/data2/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/comp_data/testdata b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/comp_data/testdata
new file mode 100755
index 00000000..5425b0f7
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/comp_data/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/comp_data/testdata-dupe b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/comp_data/testdata-dupe
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/comp_data/testdata-dupe
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/data1/testdata b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/data2/testdata b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/data2/testdata
new file mode 100755
index 00000000..5425b0f7
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/data2/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/data1/testdata b/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/data1/testdata2 b/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/data1/testdata2
new file mode 100644
index 00000000..451ac613
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/data1/testdata2
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new/data1/testdata b/debian/opensync/opensync-0.22/tests/data/sync_easy_new/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new_del/data1/testdata b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_del/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_del/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/data1/testdata b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/data2/testdata b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/data2/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/data2/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_init_error/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_init_error/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_init_error/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_init_error/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_init_error/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_init_error/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_init_error/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/sync_init_error/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_init_error/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_moddel/data1/testdata b/debian/opensync/opensync-0.22/tests/data/sync_moddel/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_moddel/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_moddel/new_data1 b/debian/opensync/opensync-0.22/tests/data/sync_moddel/new_data1
new file mode 100644
index 00000000..5746e52f
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_moddel/new_data1
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_moddel/new_data2 b/debian/opensync/opensync-0.22/tests/data/sync_moddel/new_data2
new file mode 100644
index 00000000..3b307bf6
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_moddel/new_data2
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d33471ac
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>fileasd-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..bf6ca0a3
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>TRUE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..896463d4
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>TRUE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/data1/subdir/testdata1 b/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/data1/subdir/testdata1
new file mode 100644
index 00000000..30895eae
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/data1/subdir/testdata1
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/data1/testdata b/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/data2/subdir/testdata b/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/data2/subdir/testdata
new file mode 100644
index 00000000..05758207
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/data2/subdir/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/1-conflict.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/1-conflict.vcf
new file mode 100644
index 00000000..5f31aec9
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/1-conflict.vcf
@@ -0,0 +1,22 @@
+BEGIN:VCARD
+VERSION:3.0
+URL:
+TITLE:
+ROLE:
+X-EVOLUTION-MANAGER:
+X-EVOLUTION-ASSISTANT:
+NICKNAME:
+X-EVOLUTION-SPOUSE:
+NOTE:
+FN:samename
+N:samename;;;;
+X-EVOLUTION-FILE-AS:1-conflict
+X-EVOLUTION-BLOG-URL:
+CALURI:
+FBURL:
+X-EVOLUTION-VIDEO-URL:
+X-MOZILLA-HTML:FALSE
+UID:pas-id-4220B54B00000006
+EMAIL;TYPE=WORK;X-EVOLUTION-UI-SLOT=1:evo2mail
+TEL;TYPE=WORK;TYPE=VOICE;X-EVOLUTION-UI-SLOT=1:samephone
+END:VCARD
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/1-different.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/1-different.vcf
new file mode 100644
index 00000000..6f1fc1c8
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/1-different.vcf
@@ -0,0 +1,20 @@
+BEGIN:VCARD
+VERSION:3.0
+URL:
+TITLE:
+ROLE:
+X-EVOLUTION-MANAGER:
+X-EVOLUTION-ASSISTANT:
+NICKNAME:
+X-EVOLUTION-SPOUSE:
+NOTE:
+FN:evo2name
+N:;evo2name;;;
+X-EVOLUTION-FILE-AS:1-different
+X-EVOLUTION-BLOG-URL:
+CALURI:
+FBURL:
+X-EVOLUTION-VIDEO-URL:
+X-MOZILLA-HTML:FALSE
+UID:pas-id-4220B4EE00000003
+END:VCARD \ No newline at end of file
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/1-same.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/1-same.vcf
new file mode 100644
index 00000000..79a37918
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/1-same.vcf
@@ -0,0 +1,22 @@
+BEGIN:VCARD
+VERSION:3.0
+URL:samehomepage
+TITLE:
+ROLE:
+X-EVOLUTION-MANAGER:
+X-EVOLUTION-ASSISTANT:
+NICKNAME:
+X-EVOLUTION-SPOUSE:
+NOTE:
+FN:samename
+N:samename;;;;
+X-EVOLUTION-FILE-AS:1-same
+X-EVOLUTION-BLOG-URL:
+CALURI:
+FBURL:
+X-EVOLUTION-VIDEO-URL:
+X-MOZILLA-HTML:FALSE
+EMAIL;TYPE=WORK;X-EVOLUTION-UI-SLOT=1:samemail
+TEL;TYPE=WORK;TYPE=VOICE;X-EVOLUTION-UI-SLOT=1:samephone
+UID:pas-id-4220B62E0000000B
+END:VCARD
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/2-conflict.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/2-conflict.vcf
new file mode 100644
index 00000000..5103a601
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/2-conflict.vcf
@@ -0,0 +1,25 @@
+BEGIN:VCARD
+VERSION:3.0
+URL:
+TITLE:
+ROLE:
+X-EVOLUTION-MANAGER:
+X-EVOLUTION-ASSISTANT:
+NICKNAME:
+X-EVOLUTION-SPOUSE:
+NOTE:
+FN:evo2name
+N:;evo2name;;;
+X-EVOLUTION-FILE-AS:2-conflict
+X-EVOLUTION-BLOG-URL:
+CALURI:
+FBURL:
+X-EVOLUTION-VIDEO-URL:
+X-MOZILLA-HTML:FALSE
+EMAIL;TYPE=WORK;X-EVOLUTION-UI-SLOT=1:samemail
+TEL;TYPE=WORK;TYPE=VOICE;X-EVOLUTION-UI-SLOT=1:samephone
+TEL;TYPE=HOME;TYPE=VOICE;X-EVOLUTION-UI-SLOT=2:samephone2
+ADR;TYPE=HOME:;;sameaddress;;;;
+LABEL;TYPE=HOME:sameaddress
+UID:pas-id-4220B5C300000008
+END:VCARD \ No newline at end of file
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/2-different.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/2-different.vcf
new file mode 100644
index 00000000..52b32590
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/2-different.vcf
@@ -0,0 +1,23 @@
+BEGIN:VCARD
+VERSION:3.0
+URL:
+TITLE:
+ROLE:
+X-EVOLUTION-MANAGER:
+X-EVOLUTION-ASSISTANT:
+NICKNAME:
+X-EVOLUTION-SPOUSE:
+NOTE:
+FN:samename
+N:samename;;;;
+X-EVOLUTION-FILE-AS:2-different
+X-EVOLUTION-BLOG-URL:
+CALURI:
+FBURL:
+X-EVOLUTION-VIDEO-URL:
+X-MOZILLA-HTML:FALSE
+TEL;TYPE=WORK;TYPE=VOICE;X-EVOLUTION-UI-SLOT=1:evo2phone
+ADR;TYPE=HOME:;;evo2address;;;;
+LABEL;TYPE=HOME:evo2address
+UID:pas-id-4220B53200000004
+END:VCARD
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/2-same.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/2-same.vcf
new file mode 100644
index 00000000..66d707bc
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/2-same.vcf
@@ -0,0 +1,21 @@
+BEGIN:VCARD
+VERSION:3.0
+URL:
+TITLE:
+ROLE:
+X-EVOLUTION-MANAGER:
+X-EVOLUTION-ASSISTANT:
+NICKNAME:samenick
+X-EVOLUTION-SPOUSE:
+NOTE:
+FN:samename
+N:samename;;;;
+X-EVOLUTION-FILE-AS:2-same
+X-EVOLUTION-BLOG-URL:
+CALURI:
+FBURL:
+X-EVOLUTION-VIDEO-URL:
+X-MOZILLA-HTML:FALSE
+EMAIL;TYPE=WORK;X-EVOLUTION-UI-SLOT=1:samemail
+UID:pas-id-4220B62F0000000C
+END:VCARD
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-full1.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-full1.vcf
new file mode 100644
index 00000000..c1807996
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-full1.vcf
@@ -0,0 +1,47 @@
+BEGIN:VCARD
+VERSION:3.0
+FN:Title First Middle Last Suffix
+N:Last;First;Middle;Title;Suffix
+ORG:organization;department;office
+REV:2005-02-26T10:41:24Z
+ROLE:profession
+TITLE:title
+UID:pas-id-421A5F6100000014
+URL:homepage
+X-EVOLUTION-FILE-AS:Last\, First
+X-EVOLUTION-MANAGER:manager
+X-EVOLUTION-ASSISTANT:assistant
+NICKNAME:nickname
+BDAY:2005-02-10
+X-EVOLUTION-ANNIVERSARY:2005-02-08
+X-EVOLUTION-SPOUSE:spouse
+NOTE:This is a note!
+CATEGORIES:Birthday,Business
+X-EVOLUTION-BLOG-URL:weblog
+CALURI:calendar
+FBURL:freebusy
+X-EVOLUTION-VIDEO-URL:video chat
+X-MOZILLA-HTML:TRUE
+EMAIL;TYPE=WORK;X-EVOLUTION-UI-SLOT=1:workemail
+EMAIL;TYPE=HOME;X-EVOLUTION-UI-SLOT=2:homeemail
+EMAIL;TYPE=OTHER;X-EVOLUTION-UI-SLOT=3:otheremail
+EMAIL;TYPE=OTHER;X-EVOLUTION-UI-SLOT=4:otheremail2
+TEL;TYPE=WORK;TYPE=VOICE;X-EVOLUTION-UI-SLOT=1:bizphone
+TEL;TYPE=HOME;TYPE=VOICE;X-EVOLUTION-UI-SLOT=2:homephone
+TEL;TYPE=CELL;X-EVOLUTION-UI-SLOT=3:mobphone
+TEL;TYPE=WORK;TYPE=FAX;X-EVOLUTION-UI-SLOT=4:biz fax
+TEL;TYPE="X-EVOLUTION-ASSISTANT";X-EVOLUTION-UI-SLOT=5:assistantphone
+TEL;TYPE="X-EVOLUTION-CALLBACK";X-EVOLUTION-UI-SLOT=6:callback
+TEL;TYPE=CAR;X-EVOLUTION-UI-SLOT=7:car phone
+TEL;TYPE=PREF;X-EVOLUTION-UI-SLOT=8:primary phone
+X-AIM;TYPE=HOME;X-EVOLUTION-UI-SLOT=1:aim
+X-YAHOO;TYPE=HOME;X-EVOLUTION-UI-SLOT=2:yahoo
+X-ICQ;TYPE=HOME;X-EVOLUTION-UI-SLOT=3:icq
+X-GROUPWISE;TYPE=HOME;X-EVOLUTION-UI-SLOT=4:groupwise
+ADR;TYPE=WORK:PO-BOX2;;Address2;City2;State2;zip2;country2
+LABEL;TYPE=WORK:Address2\nCity2\, State2\nzip2\nPO-BOX2\ncountry2
+ADR;TYPE=HOME:PO-BOX1;;Address1;City1;State1;zip1;country1
+LABEL;TYPE=HOME:Address1\nCity1\, State1\nzip1\nPO-BOX1\ncountry1
+ADR;TYPE=OTHER:PO-BOX3;;Address3;City3;State3;zip3;country3
+LABEL;TYPE=OTHER:Address3\nCity3\, State3\nzip3\nPO-BOX3\ncountry3
+END:VCARD \ No newline at end of file
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-full2.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-full2.vcf
new file mode 100644
index 00000000..b3f9a609
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-full2.vcf
@@ -0,0 +1,47 @@
+BEGIN:VCARD
+VERSION:3.0
+FN:Title First Middle Last Suffix
+N:Last;First;Middle;Title;Suffix
+ORG:organization;department;office
+REV:2005-02-26
+ROLE:profession
+TITLE:title
+UID:pas-id-421A5F6100000014
+URL:homepage
+X-EVOLUTION-FILE-AS:Last\, First
+X-EVOLUTION-MANAGER:manager
+X-EVOLUTION-ASSISTANT:assistant
+NICKNAME:nickname
+BDAY:2005-02-10
+X-EVOLUTION-ANNIVERSARY:2005-02-08
+X-EVOLUTION-SPOUSE:spouse
+NOTE:This is a note!
+CATEGORIES:Birthday,Business
+X-EVOLUTION-BLOG-URL:weblog
+CALURI:calendar
+FBURL:freebusy
+X-EVOLUTION-VIDEO-URL:video chat
+X-MOZILLA-HTML:TRUE
+ADR;TYPE=WORK:PO-BOX2;;Address2;City2;State2;zip2;country2
+LABEL;TYPE=WORK:Address2\nCity2\, State2\nzip2\nPO-BOX2\ncountry2
+ADR;TYPE=HOME:PO-BOX1;;Address1;City1;State1;zip1;country1
+LABEL;TYPE=HOME:Address1\nCity1\, State1\nzip1\nPO-BOX1\ncountry1
+ADR;TYPE=OTHER:PO-BOX3;;Address3;City3;State3;zip3;country3
+LABEL;TYPE=OTHER:Address3\nCity3\, State3\nzip3\nPO-BOX3\ncountry3
+EMAIL;TYPE=WORK;X-EVOLUTION-UI-SLOT=1:workemail
+EMAIL;TYPE=HOME;X-EVOLUTION-UI-SLOT=2:homeemail
+EMAIL;TYPE=OTHER;X-EVOLUTION-UI-SLOT=3:otheremail
+EMAIL;TYPE=OTHER;X-EVOLUTION-UI-SLOT=4:otheremail2
+TEL;TYPE="X-EVOLUTION-COMPANY";X-EVOLUTION-UI-SLOT=1:company phone
+TEL;TYPE=HOME;TYPE=FAX;X-EVOLUTION-UI-SLOT=2:homefax
+TEL;TYPE=FAX;X-EVOLUTION-UI-SLOT=3:other fax
+TEL;TYPE=PAGER;X-EVOLUTION-UI-SLOT=4:pager
+TEL;TYPE=ISDN;X-EVOLUTION-UI-SLOT=5:ISDN
+TEL;TYPE=VOICE;X-EVOLUTION-UI-SLOT=6:other phone
+TEL;TYPE="X-EVOLUTION-RADIO";X-EVOLUTION-UI-SLOT=7:radio
+TEL;TYPE="X-EVOLUTION-TELEX";X-EVOLUTION-UI-SLOT=8:telex
+X-JABBER;TYPE=HOME;X-EVOLUTION-UI-SLOT=3:jabber
+X-YAHOO;TYPE=HOME;X-EVOLUTION-UI-SLOT=2:yahoo
+X-MSN;TYPE=HOME;X-EVOLUTION-UI-SLOT=1:msn
+X-GROUPWISE;TYPE=HOME;X-EVOLUTION-UI-SLOT=4:groupwise
+END:VCARD \ No newline at end of file
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-multiline.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-multiline.vcf
new file mode 100644
index 00000000..596543e3
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-multiline.vcf
@@ -0,0 +1,53 @@
+BEGIN:VCARD
+VERSION:3.0
+FN:Title First Middle Last Suffix
+N:Last;First;Middle;Title;Suffix
+ORG:organization;department;office
+REV:20050226
+ROLE:profession
+TITLE:title
+UID:pas-id-421A5F6100000014
+URL:homepage
+X-EVOLUTION-FILE-AS:Last\, First
+X-EVOLUTION-MANAGER:manager
+X-EVOLUTION-ASSISTANT:assistant
+NICKNAME:nickname
+BDAY:2005-02-10
+X-EVOLUTION-ANNIVERSARY:2005-02-08
+X-EVOLUTION-SPOUSE:spouse
+NOTE:This is a multiline note!\nNote how there are multiple\nl\ni\nn\ne\ns
+CATEGORIES:Birthday,Business
+X-EVOLUTION-BLOG-URL:weblog
+CALURI:calendar
+FBURL:freebusy
+X-EVOLUTION-VIDEO-URL:video chat
+X-MOZILLA-HTML:TRUE
+ADR;TYPE=WORK:PO-BOX2;Multiline street\nmultiline city;Address2;City2;State
+ 2;zip2;country2
+LABEL;TYPE=WORK:Address2\nMultiline street\nmultiline city\nCity2\, State2\
+ nzip2\nPO-BOX2\ncountry2
+ADR;TYPE=HOME:PO-BOX1;Multiline street\nmultiline city\n;Address1;City1;Sta
+ te1;zip1;country1
+LABEL;TYPE=HOME:Address1\nMultiline street\nmultiline city\n\nCity1\, State
+ 1\nzip1\nPO-BOX1\ncountry1
+ADR;TYPE=OTHER:PO-BOX3;Multiline street\nmultiline city;Address3;City3;Stat
+ e3;zip3;country3
+LABEL;TYPE=OTHER:Address3\nMultiline street\nmultiline city\nCity3\, State3
+ \nzip3\nPO-BOX3\ncountry3
+EMAIL;TYPE=WORK;X-EVOLUTION-UI-SLOT=1:workemail
+EMAIL;TYPE=HOME;X-EVOLUTION-UI-SLOT=2:homeemail
+EMAIL;TYPE=OTHER;X-EVOLUTION-UI-SLOT=3:otheremail
+EMAIL;TYPE=OTHER;X-EVOLUTION-UI-SLOT=4:otheremail2
+TEL;TYPE="X-EVOLUTION-COMPANY";X-EVOLUTION-UI-SLOT=1:company phone
+TEL;TYPE=HOME;TYPE=FAX;X-EVOLUTION-UI-SLOT=2:homefax
+TEL;TYPE=FAX;X-EVOLUTION-UI-SLOT=3:other fax
+TEL;TYPE=PAGER;X-EVOLUTION-UI-SLOT=4:pager
+TEL;TYPE=ISDN;X-EVOLUTION-UI-SLOT=5:ISDN
+TEL;TYPE=VOICE;X-EVOLUTION-UI-SLOT=6:other phone
+TEL;TYPE="X-EVOLUTION-RADIO";X-EVOLUTION-UI-SLOT=7:radio
+TEL;TYPE="X-EVOLUTION-TELEX";X-EVOLUTION-UI-SLOT=8:telex
+X-JABBER;TYPE=HOME;X-EVOLUTION-UI-SLOT=3:jabber
+X-YAHOO;TYPE=HOME;X-EVOLUTION-UI-SLOT=2:yahoo
+X-MSN;TYPE=HOME;X-EVOLUTION-UI-SLOT=1:msn
+X-GROUPWISE;TYPE=HOME;X-EVOLUTION-UI-SLOT=4:groupwise
+END:VCARD \ No newline at end of file
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-photo.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-photo.vcf
new file mode 100644
index 00000000..389c9c9e
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-photo.vcf
@@ -0,0 +1,59 @@
+BEGIN:VCARD
+VERSION:3.0
+FN:Title First Middle Last Suffix
+N:Last;First;Middle;Title;Suffix
+ORG:organization;department;office
+REV:20050226T104124,2Z
+ROLE:profession
+TITLE:title
+UID:pas-id-421A5F6100000014
+URL:homepage
+X-EVOLUTION-FILE-AS:Last\, First
+X-EVOLUTION-MANAGER:manager
+X-EVOLUTION-ASSISTANT:assistant
+NICKNAME:nickname
+BDAY:2005-02-10
+X-EVOLUTION-ANNIVERSARY:2005-02-08
+X-EVOLUTION-SPOUSE:spouse
+NOTE:This is a note!
+CATEGORIES:Birthday,Business
+X-EVOLUTION-BLOG-URL:weblog
+CALURI:calendar
+FBURL:freebusy
+X-EVOLUTION-VIDEO-URL:video chat
+X-MOZILLA-HTML:TRUE
+ADR;TYPE=WORK:PO-BOX2;;Address2;City2;State2;zip2;country2
+LABEL;TYPE=WORK:Address2\nCity2\, State2\nzip2\nPO-BOX2\ncountry2
+ADR;TYPE=HOME:PO-BOX1;;Address1;City1;State1;zip1;country1
+LABEL;TYPE=HOME:Address1\nCity1\, State1\nzip1\nPO-BOX1\ncountry1
+ADR;TYPE=OTHER:PO-BOX3;;Address3;City3;State3;zip3;country3
+LABEL;TYPE=OTHER:Address3\nCity3\, State3\nzip3\nPO-BOX3\ncountry3
+PHOTO;ENCODING=b;TYPE=PNG:iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAIAAAADnC86AAAAC
+ XBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH1QIaEQILc0Ox6gAAAB10RVh0Q29tbWVudABDc
+ mVhdGVkIHdpdGggVGhlIEdJTVDvZCVuAAAB7ElEQVRYw+2XTasxYRjH/8dwGpq8xEaajZeJU
+ BZoykL2ysbCTrGUfAZr2UtJKTtJ8QGUrWKhKOELjMKUtybO4q7ZnM7E88zT6am5Vnd3v7l+m
+ 7muf/fH8/nEb5QOv1SaWBNrYk2sif+pWJKkbrebyWRcLpfBYKBpmuO4QqEwmUze6PJ8s5bLZ
+ TgcJt/SNO12u10uF0VR5CaXy4mi+EofvGu12+0AvF5vr9e7Xq/kXhCEWq3GMAyARCJxuVzUF
+ N/v91AoBCAajR4Oh+/AdDq1WCwAKpWKmuJmswnAaDRuNpufmFarBUCv1+92O9XEPM8DKBaLC
+ owkSSzLAqhWq+qIRVHU6XQARqORMlkqlQAkk0ll7NVxWq/Xj8cDQCQSUSYJsFqt1Jnj/X5PD
+ g6HQ5kkgMz/t5uLjC8AQRCUSQLI/N+KfT4f+bnm87kySQC/36+OmGGYWCwGYDAYKGCPx2M4H
+ AJIpVKq7epGowHAZDJtt9ufmHa7TRaIAvP2ArndboFAAEA8Hj8ej9+B2WxmtVoBlMtllUNis
+ VjYbDYAHMf1+305JPb7fb1eN5vNAHieP5/PKouJOxgMyrHo8XhYlpVjMZvNnk4n9WNRjqlOp
+ 5NOp51OJ0VRn5+fHo8nn8+Px+PXm3xoz1RNrIk18Z/WF7ZpjC1N/OYqAAAAAElFTkSuQmCC
+EMAIL;TYPE=WORK;X-EVOLUTION-UI-SLOT=1:workemail
+EMAIL;TYPE=HOME;X-EVOLUTION-UI-SLOT=2:homeemail
+EMAIL;TYPE=OTHER;X-EVOLUTION-UI-SLOT=3:otheremail
+EMAIL;TYPE=OTHER;X-EVOLUTION-UI-SLOT=4:otheremail2
+TEL;TYPE="X-EVOLUTION-COMPANY";X-EVOLUTION-UI-SLOT=1:company phone
+TEL;TYPE=HOME;TYPE=FAX;X-EVOLUTION-UI-SLOT=2:homefax
+TEL;TYPE=FAX;X-EVOLUTION-UI-SLOT=3:other fax
+TEL;TYPE=PAGER;X-EVOLUTION-UI-SLOT=4:pager
+TEL;TYPE=ISDN;X-EVOLUTION-UI-SLOT=5:ISDN
+TEL;TYPE=VOICE;X-EVOLUTION-UI-SLOT=6:other phone
+TEL;TYPE="X-EVOLUTION-RADIO";X-EVOLUTION-UI-SLOT=7:radio
+TEL;TYPE="X-EVOLUTION-TELEX";X-EVOLUTION-UI-SLOT=8:telex
+X-JABBER;TYPE=HOME;X-EVOLUTION-UI-SLOT=3:jabber
+X-YAHOO;TYPE=HOME;X-EVOLUTION-UI-SLOT=2:yahoo
+X-MSN;TYPE=HOME;X-EVOLUTION-UI-SLOT=1:msn
+X-GROUPWISE;TYPE=HOME;X-EVOLUTION-UI-SLOT=4:groupwise
+END:VCARD \ No newline at end of file
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-special.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-special.vcf
new file mode 100644
index 00000000..c38c0d34
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-special.vcf
@@ -0,0 +1,26 @@
+BEGIN:VCARD
+VERSION:3.0
+FN:Titleö Firstä Middleü Lastß Suffixö
+N:Lastß;Firstä;Middleü;Titleö;Suffixö
+ORG:organization;department;office
+REV:2005-02-26T10:41:24Z
+ROLE:profession
+TITLE:title
+UID:pas-id-421A5F6100000014
+URL:homepage
+X-EVOLUTION-FILE-AS:Lastß\, Firstä
+X-EVOLUTION-MANAGER:manager
+X-EVOLUTION-ASSISTANT:assistant
+NICKNAME:nicknameü
+BDAY:2005-02-10
+X-EVOLUTION-ANNIVERSARY:2005-02-08
+X-EVOLUTION-SPOUSE:spouse
+NOTE:This is a multiline note with special chars\n!"§$%&/()=?`'*+~'#-_:.\;
+ \,^°@€¹²³¼½½¬{[[]}\\¸¨þø→â†â†’€ł@æßðjđŋĸjħł
+ <-tab
+X-EVOLUTION-BLOG-URL:
+CALURI:
+FBURL:
+X-EVOLUTION-VIDEO-URL:
+X-MOZILLA-HTML:FALSE
+END:VCARD \ No newline at end of file
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-umlaute.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-umlaute.vcf
new file mode 100644
index 00000000..e7bc108e
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-umlaute.vcf
@@ -0,0 +1,54 @@
+BEGIN:VCARD
+VERSION:3.0
+FN:Titleö Firstä Middleü Lastß Suffixö
+N:Lastß;Firstä;Middleü;Titleö;Suffixö
+ORG:organization;department;office
+REV:2005-02-26T10:41:24Z
+ROLE:profession
+TITLE:title
+UID:pas-id-421A5F6100000014
+URL:homepage
+X-EVOLUTION-FILE-AS:Lastß\, Firstä
+X-EVOLUTION-MANAGER:manager
+X-EVOLUTION-ASSISTANT:assistant
+NICKNAME:nicknameü
+BDAY:2005-02-10
+X-EVOLUTION-ANNIVERSARY:2005-02-08
+X-EVOLUTION-SPOUSE:spouse
+NOTE:This is a multiline note with special chars\nNote how there are multip
+ le\nl\ni\nn\ne\ns\nand special chars: öüööüöäüßßß asd
+CATEGORIES:Birthday,Business
+X-EVOLUTION-BLOG-URL:weblog
+CALURI:calendar
+FBURL:freebusy
+X-EVOLUTION-VIDEO-URL:video chat
+X-MOZILLA-HTML:TRUE
+ADR;TYPE=WORK:PO-BOX2;Multiline street\nmultiline cityäüööüä;Address2
+ ;City2;State2;zip2;country2
+LABEL;TYPE=WORK:Address2\nMultiline street\nmultiline cityäüööüä\nCit
+ y2\, State2\nzip2\nPO-BOX2\ncountry2
+ADR;TYPE=HOME:PO-BOX1;Multiline street\nmultiline city\nöüä;Address1;Cit
+ y1;State1;zip1;country1
+LABEL;TYPE=HOME:Address1\nMultiline street\nmultiline city\nöüä\nCity1\,
+ State1\nzip1\nPO-BOX1\ncountry1
+ADR;TYPE=OTHER:PO-BOX3;Multiline street\nmultiline cityä\nöü;Address3;Ci
+ ty3;State3;zip3;country3
+LABEL;TYPE=OTHER:Address3\nMultiline street\nmultiline cityä\nöü\nCity3\
+ , State3\nzip3\nPO-BOX3\ncountry3
+EMAIL;TYPE=WORK;X-EVOLUTION-UI-SLOT=1:workemailö
+EMAIL;TYPE=HOME;X-EVOLUTION-UI-SLOT=2:homeemailü
+EMAIL;TYPE=OTHER;X-EVOLUTION-UI-SLOT=3:otheremailü
+EMAIL;TYPE=OTHER;X-EVOLUTION-UI-SLOT=4:otheremail2ä
+TEL;TYPE="X-EVOLUTION-COMPANY";X-EVOLUTION-UI-SLOT=1:company phoneöä
+TEL;TYPE=HOME;TYPE=FAX;X-EVOLUTION-UI-SLOT=2:homefaxöä
+TEL;TYPE=FAX;X-EVOLUTION-UI-SLOT=3:other fax
+TEL;TYPE=PAGER;X-EVOLUTION-UI-SLOT=4:pagerß
+TEL;TYPE=ISDN;X-EVOLUTION-UI-SLOT=5:ISDNä
+TEL;TYPE=VOICE;X-EVOLUTION-UI-SLOT=6:other phoneö
+TEL;TYPE="X-EVOLUTION-RADIO";X-EVOLUTION-UI-SLOT=7:radioü
+TEL;TYPE="X-EVOLUTION-TELEX";X-EVOLUTION-UI-SLOT=8:telexä
+X-JABBER;TYPE=HOME;X-EVOLUTION-UI-SLOT=3:jabberüä
+X-YAHOO;TYPE=HOME;X-EVOLUTION-UI-SLOT=2:yahooä
+X-MSN;TYPE=HOME;X-EVOLUTION-UI-SLOT=1:msnöä
+X-GROUPWISE;TYPE=HOME;X-EVOLUTION-UI-SLOT=4:groupwiseä
+END:VCARD \ No newline at end of file
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/1-conflict.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/1-conflict.vcf
new file mode 100644
index 00000000..c2f49165
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/1-conflict.vcf
@@ -0,0 +1,9 @@
+BEGIN:VCARD
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT:kdepimmail
+FN;CHARSET=UTF-8;ENCODING=8BIT:samename
+N;CHARSET=UTF-8;ENCODING=8BIT:samename;;;;
+TEL;TYPE=WORK:samephone
+UID:V7xU0LoAWW
+VERSION:2.1
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/1-different.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/1-different.vcf
new file mode 100644
index 00000000..09aca584
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/1-different.vcf
@@ -0,0 +1,7 @@
+BEGIN:VCARD
+FN;CHARSET=UTF-8;ENCODING=8BIT:kdepimname
+N;CHARSET=UTF-8;ENCODING=8BIT:kdepimname;;;;
+UID:Sd11KbFgl1
+VERSION:2.1
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/1-same.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/1-same.vcf
new file mode 100644
index 00000000..77b829ed
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/1-same.vcf
@@ -0,0 +1,10 @@
+BEGIN:VCARD
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT:samemail
+FN;CHARSET=UTF-8;ENCODING=8BIT:samename
+N;CHARSET=UTF-8;ENCODING=8BIT:samename;;;;
+TEL;TYPE=WORK:samephone
+UID:sZYtQZb5Ec
+URL:samehomepage
+VERSION:2.1
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/2-conflict.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/2-conflict.vcf
new file mode 100644
index 00000000..74a0a636
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/2-conflict.vcf
@@ -0,0 +1,12 @@
+BEGIN:VCARD
+ADR;TYPE=home:;;sameaddress;;;;Germany
+CLASS:PUBLIC
+EMAIL:samemail
+FN:kdepimname
+N:kdepimname;;;;
+TEL;TYPE=WORK:samephone
+TEL;TYPE=HOME:samephone2
+UID:NbLz18IEVc
+VERSION:3.0
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/2-different.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/2-different.vcf
new file mode 100644
index 00000000..496e8512
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/2-different.vcf
@@ -0,0 +1,10 @@
+BEGIN:VCARD
+ADR;TYPE=home:;;kdepimaddress;;;;Germany
+CLASS:PUBLIC
+FN:samename
+N:samename;;;;
+TEL;TYPE=WORK:kdepimphone
+UID:XtGNq0mPdN
+VERSION:3.0
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/2-same.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/2-same.vcf
new file mode 100644
index 00000000..d08155c5
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/2-same.vcf
@@ -0,0 +1,10 @@
+BEGIN:VCARD
+CLASS:PUBLIC
+EMAIL:samemail
+FN:samename
+N:samename;;;;
+NICKNAME:samenick
+UID:XfqLidtnBt
+VERSION:3.0
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-full1-2.1.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-full1-2.1.vcf
new file mode 100644
index 00000000..d99a4df6
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-full1-2.1.vcf
@@ -0,0 +1,75 @@
+BEGIN:VCARD
+ADR;CHARSET=UTF-8;ENCODING=8BIT;TYPE=work:pobox2;;Street1 work;locale2;regi
+ on2;postalcode2;Germany
+ADR;CHARSET=UTF-8;ENCODING=8BIT;TYPE=home;TYPE=pref:pobox1;;HomeAddress1;lo
+ cal1;region1;postalcode1;Germany
+BDAY:2005-02-26T00:00:00Z
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT;TYPE=PREF:email1
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT:email2@test.com
+FN;CHARSET=UTF-8;ENCODING=8BIT:givenname familynames
+GEO:52.500000;13.366667
+KEY;ENCODING=b;TYPE=PGP:mQGiBECXtzARBAC99Ll8ePW6FCzq8KUBwEYzo+J/u4EmkgCxgWm
+ Vzsvj2Uu7/OhwFaGJcv+fBSF+XtGhZeUk+Pcl4x0tMY5H07/k6ObF8+0O164J+Jg5bMlk2I6X1n
+ UhmAA4aIZCALHwcNZCq9b7HMKr3Sh1eMas2MQ2hL7mTrkfrcxqSNmTA1l/BwCgo+yOOozD6kohz
+ nRr+8jiYimho30EAJDN9YKkTh3kM1jrc9Q11N7zEnQUXtPC4GqQmW7BXgEmSBErEduk3N9NqnzG
+ xFruQrpXWisExv4z/t67uBou++m64J/Ad+T6wC19h72U15UVch/4bU7YqACjdlocUBfmnV3njko
+ Dhl6wmg7fxdCOJfkCXw+VKD9iiqXiSlqFh3IjA/4hdl3npIPKa0EeDnHDSUIbtZAd74i3Lzz1fJ
+ h5vip5N3alqSynJPmzPCWE7dMzOB/iPb+G50X046QT2OEypN9L5Trd5KJonlg+crN/aUZSjCmCC
+ foaBiISdox753MkVOipWH15F27KOqPHBNLrCnrYVCLMNpN/4aSbrn7AXzjbELQlQXJtaW4gQmF1
+ ZXIgPGFybWluLmJhdWVyQGRlc3Njb24uY29tPoheBBMRAgAeBQJAl7cwAhsDBgsJCAcDAgMVAgM
+ DFgIBAh4BAheAAAoJEKvc+7/ZPVGpDNQAmwaN2121JO3i3AcRT5ns8KeQU2x2AJ9w5i2jQ5gZ4m
+ 3jVJPFohsL03i2hbQgQXJtaW4gQmF1ZXIgPGF6cmFlbEBkZXNzY29uLmNvbT6IXgQTEQIAHgUCQ
+ Je5JQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRCr3Pu/2T1RqfVrAJ9ANz3hB4TqVahybg8i
+ XJUfmOtjbACfSLJBPGBI84P/RIEe7FKCDC05ZT65AQ0EQJe3MBAEALFujyLPriDAyh0+u8KXoBf
+ SSrnyrDnjvhG0gGsyqSfE06JvKDK6q0ZUlRAj/1cbHS+Rb8t6mUN8HquVjPkWG6eNhcGNnRxjc+
+ 7OqCiVhN7rt4c2HibVQWLy/8y04/Uqj2F9TwaiiuixIJiVA0tdqdgPxFFSCS6aRJhJ6EBw+rbXA
+ AMFBACtsn+fb3aQlaFiBurznAHmv/j2X3k2WXtaubPkNKEWf7HyLos0F5vSw0/hh0/YBabdpaK8
+ LNNuP3Q0ABPjUzyK7cH5fxHPb8BWKIKvB5aXAPr4fMFnRmvpzKmmV1yxegHQvmnpZEloODtWa1J
+ /qNq8OlFhks4tVFyxj7uKmRF1yIhJBBgRAgAJBQJAl7cwAhsMAAoJEKvc+7/ZPVGpqaoAn0yTGk
+ 6w/agEpgjKrsDAACV3l8mpAJ9X3AzwPCKMIx+NpIetkoKFroWxrQ==
+N;CHARSET=UTF-8;ENCODING=8BIT:familynames;givenname;additional names;prefix
+ ;suffix
+NOTE;CHARSET=UTF-8;ENCODING=8BIT:This is a note!
+ORG;CHARSET=UTF-8;ENCODING=8BIT:organization
+ROLE;CHARSET=UTF-8;ENCODING=8BIT:role
+TEL;TYPE=WORK:workphone
+TEL;TYPE=FAX;TYPE=WORK:work fax
+TEL;TYPE=HOME:homephone
+TEL;TYPE=CELL:mobilephone
+TEL;TYPE=FAX;TYPE=HOME:homefax
+TEL;TYPE=MSG:messenger
+TEL;TYPE=FAX;TYPE=PREF:fax
+TEL;TYPE=VIDEO:vidoe
+TEL;TYPE=MODEM:modem
+TEL;TYPE=ISDN:isdn
+TEL;TYPE=PAGER:pager
+TEL;TYPE=BBS:mailbox
+TEL;TYPE=CAR:car
+TEL;TYPE=PCS:pcs
+UID:aZAQgtBIOB
+URL:homepage
+VERSION:2.1
+X-KADDRESSBOOK-CRYPTOENCRYPTPREF;CHARSET=UTF-8;ENCODING=8BIT:never
+X-KADDRESSBOOK-CRYPTOPROTOPREF;CHARSET=UTF-8;ENCODING=8BIT:inline openpgp,o
+ penpgp/mime,s/mime,s/mime opaque
+X-KADDRESSBOOK-CRYPTOSIGNPREF;CHARSET=UTF-8;ENCODING=8BIT:always
+X-KADDRESSBOOK-OPENPGPFP;CHARSET=UTF-8;ENCODING=8BIT:C754DDC1ECF537C4805710
+ FDABDCFBBFD93D51A9
+X-KADDRESSBOOK-X-Anniversary;CHARSET=UTF-8;ENCODING=8BIT:2005-02-10
+X-KADDRESSBOOK-X-AssistantsName;CHARSET=UTF-8;ENCODING=8BIT:assistant
+X-KADDRESSBOOK-X-Department;CHARSET=UTF-8;ENCODING=8BIT:department
+X-KADDRESSBOOK-X-IMAddress;CHARSET=UTF-8;ENCODING=8BIT:im address
+X-KADDRESSBOOK-X-ManagersName;CHARSET=UTF-8;ENCODING=8BIT:manager
+X-KADDRESSBOOK-X-Office;CHARSET=UTF-8;ENCODING=8BIT:office
+X-KADDRESSBOOK-X-Profession;CHARSET=UTF-8;ENCODING=8BIT:profession
+X-KADDRESSBOOK-X-SpousesName;CHARSET=UTF-8;ENCODING=8BIT:spouse
+X-messaging/aim-All;CHARSET=UTF-8;ENCODING=8BIT:aim
+X-messaging/gadu-All;CHARSET=UTF-8;ENCODING=8BIT:gadugadu
+X-messaging/icq-All;CHARSET=UTF-8;ENCODING=8BIT:icq
+X-messaging/irc-All;CHARSET=UTF-8;ENCODING=8BIT:irc
+X-messaging/msn-All;CHARSET=UTF-8;ENCODING=8BIT:msn
+X-messaging/sms-All;CHARSET=UTF-8;ENCODING=8BIT:im sms
+X-messaging/xmpp-All;CHARSET=UTF-8;ENCODING=8BIT:jabber
+X-messaging/yahoo-All;CHARSET=UTF-8;ENCODING=8BIT:yahoo
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-full1-3.0.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-full1-3.0.vcf
new file mode 100644
index 00000000..8e746820
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-full1-3.0.vcf
@@ -0,0 +1,75 @@
+BEGIN:VCARD
+ADR;TYPE=work:pobox2;;Street1 work;locale2;region2;postalcode2;Germany
+ADR;TYPE=home;TYPE=pref:pobox1;;HomeAddress1;local1;region1;postalcode1;Ger
+ many
+BDAY:2005-02-26T00:00:00Z
+CATEGORIES:Customer,Family
+CLASS:PUBLIC
+EMAIL;TYPE=PREF:email1
+EMAIL:email2@test.com
+FN:givenname familynames
+GEO:52.500000;13.366667
+KEY;ENCODING=b;TYPE=PGP:mQGiBECXtzARBAC99Ll8ePW6FCzq8KUBwEYzo+J/u4EmkgCxgWm
+ Vzsvj2Uu7/OhwFaGJcv+fBSF+XtGhZeUk+Pcl4x0tMY5H07/k6ObF8+0O164J+Jg5bMlk2I6X1n
+ UhmAA4aIZCALHwcNZCq9b7HMKr3Sh1eMas2MQ2hL7mTrkfrcxqSNmTA1l/BwCgo+yOOozD6kohz
+ nRr+8jiYimho30EAJDN9YKkTh3kM1jrc9Q11N7zEnQUXtPC4GqQmW7BXgEmSBErEduk3N9NqnzG
+ xFruQrpXWisExv4z/t67uBou++m64J/Ad+T6wC19h72U15UVch/4bU7YqACjdlocUBfmnV3njko
+ Dhl6wmg7fxdCOJfkCXw+VKD9iiqXiSlqFh3IjA/4hdl3npIPKa0EeDnHDSUIbtZAd74i3Lzz1fJ
+ h5vip5N3alqSynJPmzPCWE7dMzOB/iPb+G50X046QT2OEypN9L5Trd5KJonlg+crN/aUZSjCmCC
+ foaBiISdox753MkVOipWH15F27KOqPHBNLrCnrYVCLMNpN/4aSbrn7AXzjbELQlQXJtaW4gQmF1
+ ZXIgPGFybWluLmJhdWVyQGRlc3Njb24uY29tPoheBBMRAgAeBQJAl7cwAhsDBgsJCAcDAgMVAgM
+ DFgIBAh4BAheAAAoJEKvc+7/ZPVGpDNQAmwaN2121JO3i3AcRT5ns8KeQU2x2AJ9w5i2jQ5gZ4m
+ 3jVJPFohsL03i2hbQgQXJtaW4gQmF1ZXIgPGF6cmFlbEBkZXNzY29uLmNvbT6IXgQTEQIAHgUCQ
+ Je5JQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRCr3Pu/2T1RqfVrAJ9ANz3hB4TqVahybg8i
+ XJUfmOtjbACfSLJBPGBI84P/RIEe7FKCDC05ZT65AQ0EQJe3MBAEALFujyLPriDAyh0+u8KXoBf
+ SSrnyrDnjvhG0gGsyqSfE06JvKDK6q0ZUlRAj/1cbHS+Rb8t6mUN8HquVjPkWG6eNhcGNnRxjc+
+ 7OqCiVhN7rt4c2HibVQWLy/8y04/Uqj2F9TwaiiuixIJiVA0tdqdgPxFFSCS6aRJhJ6EBw+rbXA
+ AMFBACtsn+fb3aQlaFiBurznAHmv/j2X3k2WXtaubPkNKEWf7HyLos0F5vSw0/hh0/YBabdpaK8
+ LNNuP3Q0ABPjUzyK7cH5fxHPb8BWKIKvB5aXAPr4fMFnRmvpzKmmV1yxegHQvmnpZEloODtWa1J
+ /qNq8OlFhks4tVFyxj7uKmRF1yIhJBBgRAgAJBQJAl7cwAhsMAAoJEKvc+7/ZPVGpqaoAn0yTGk
+ 6w/agEpgjKrsDAACV3l8mpAJ9X3AzwPCKMIx+NpIetkoKFroWxrQ==
+N:familynames;givenname;additional names;prefix;suffix
+NICKNAME:nickname
+NOTE:This is a note!
+ORG:organization
+ROLE:role
+TEL;TYPE=WORK:workphone
+TEL;TYPE=FAX;TYPE=WORK:work fax
+TEL;TYPE=HOME:homephone
+TEL;TYPE=CELL:mobilephone
+TEL;TYPE=FAX;TYPE=HOME:homefax
+TEL;TYPE=MSG:messenger
+TEL;TYPE=FAX;TYPE=PREF:fax
+TEL;TYPE=VIDEO:vidoe
+TEL;TYPE=MODEM:modem
+TEL;TYPE=ISDN:isdn
+TEL;TYPE=PAGER:pager
+TEL;TYPE=BBS:mailbox
+TEL;TYPE=CAR:car
+TEL;TYPE=PCS:pcs
+UID:aZAQgtBIOB
+URL:homepage
+VERSION:3.0
+X-KADDRESSBOOK-CRYPTOENCRYPTPREF:never
+X-KADDRESSBOOK-CRYPTOPROTOPREF:inline openpgp,openpgp/mime,s/mime,s/mime op
+ aque
+X-KADDRESSBOOK-CRYPTOSIGNPREF:always
+X-KADDRESSBOOK-OPENPGPFP:C754DDC1ECF537C4805710FDABDCFBBFD93D51A9
+X-KADDRESSBOOK-X-Anniversary:2005-02-10
+X-KADDRESSBOOK-X-AssistantsName:assistant
+X-KADDRESSBOOK-X-Department:department
+X-KADDRESSBOOK-X-IMAddress:im address
+X-KADDRESSBOOK-X-ManagersName:manager
+X-KADDRESSBOOK-X-Office:office
+X-KADDRESSBOOK-X-Profession:profession
+X-KADDRESSBOOK-X-SpousesName:spouse
+X-messaging/aim-All:aim
+X-messaging/gadu-All:gadugadu
+X-messaging/icq-All:icq
+X-messaging/irc-All:irc
+X-messaging/msn-All:msn
+X-messaging/sms-All:im sms
+X-messaging/xmpp-All:jabber
+X-messaging/yahoo-All:yahoo
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-full2-2.1.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-full2-2.1.vcf
new file mode 100644
index 00000000..a6388d19
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-full2-2.1.vcf
@@ -0,0 +1,76 @@
+BEGIN:VCARD
+ADR;CHARSET=UTF-8;ENCODING=8BIT;TYPE=work:pobox2;;Street1 work;locale2;regi
+ on2;postalcode2;Germany
+ADR;CHARSET=UTF-8;ENCODING=8BIT;TYPE=home;TYPE=pref:pobox1;;HomeAddress1;lo
+ cal1;region1;postalcode1;Germany
+BDAY:2005-02-26T00:00:00Z
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT;TYPE=PREF:email1
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT:email2@test.com
+FN;CHARSET=UTF-8;ENCODING=8BIT:givenname familynames
+GEO:52.500000;13.366667
+KEY;ENCODING=b;TYPE=PGP:mQGiBECXtzARBAC99Ll8ePW6FCzq8KUBwEYzo+J/u4EmkgCxgWm
+ Vzsvj2Uu7/OhwFaGJcv+fBSF+XtGhZeUk+Pcl4x0tMY5H07/k6ObF8+0O164J+Jg5bMlk2I6X1n
+ UhmAA4aIZCALHwcNZCq9b7HMKr3Sh1eMas2MQ2hL7mTrkfrcxqSNmTA1l/BwCgo+yOOozD6kohz
+ nRr+8jiYimho30EAJDN9YKkTh3kM1jrc9Q11N7zEnQUXtPC4GqQmW7BXgEmSBErEduk3N9NqnzG
+ xFruQrpXWisExv4z/t67uBou++m64J/Ad+T6wC19h72U15UVch/4bU7YqACjdlocUBfmnV3njko
+ Dhl6wmg7fxdCOJfkCXw+VKD9iiqXiSlqFh3IjA/4hdl3npIPKa0EeDnHDSUIbtZAd74i3Lzz1fJ
+ h5vip5N3alqSynJPmzPCWE7dMzOB/iPb+G50X046QT2OEypN9L5Trd5KJonlg+crN/aUZSjCmCC
+ foaBiISdox753MkVOipWH15F27KOqPHBNLrCnrYVCLMNpN/4aSbrn7AXzjbELQlQXJtaW4gQmF1
+ ZXIgPGFybWluLmJhdWVyQGRlc3Njb24uY29tPoheBBMRAgAeBQJAl7cwAhsDBgsJCAcDAgMVAgM
+ DFgIBAh4BAheAAAoJEKvc+7/ZPVGpDNQAmwaN2121JO3i3AcRT5ns8KeQU2x2AJ9w5i2jQ5gZ4m
+ 3jVJPFohsL03i2hbQgQXJtaW4gQmF1ZXIgPGF6cmFlbEBkZXNzY29uLmNvbT6IXgQTEQIAHgUCQ
+ Je5JQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRCr3Pu/2T1RqfVrAJ9ANz3hB4TqVahybg8i
+ XJUfmOtjbACfSLJBPGBI84P/RIEe7FKCDC05ZT65AQ0EQJe3MBAEALFujyLPriDAyh0+u8KXoBf
+ SSrnyrDnjvhG0gGsyqSfE06JvKDK6q0ZUlRAj/1cbHS+Rb8t6mUN8HquVjPkWG6eNhcGNnRxjc+
+ 7OqCiVhN7rt4c2HibVQWLy/8y04/Uqj2F9TwaiiuixIJiVA0tdqdgPxFFSCS6aRJhJ6EBw+rbXA
+ AMFBACtsn+fb3aQlaFiBurznAHmv/j2X3k2WXtaubPkNKEWf7HyLos0F5vSw0/hh0/YBabdpaK8
+ LNNuP3Q0ABPjUzyK7cH5fxHPb8BWKIKvB5aXAPr4fMFnRmvpzKmmV1yxegHQvmnpZEloODtWa1J
+ /qNq8OlFhks4tVFyxj7uKmRF1yIhJBBgRAgAJBQJAl7cwAhsMAAoJEKvc+7/ZPVGpqaoAn0yTGk
+ 6w/agEpgjKrsDAACV3l8mpAJ9X3AzwPCKMIx+NpIetkoKFroWxrQ==
+N;CHARSET=UTF-8;ENCODING=8BIT:familynames;givenname;additional names;prefix
+ ;suffix
+NOTE;CHARSET=UTF-8;ENCODING=8BIT:This is a note!
+ORG;CHARSET=UTF-8;ENCODING=8BIT:organization
+ROLE;CHARSET=UTF-8;ENCODING=8BIT:role
+TEL;TYPE=WORK:workphone
+TEL;TYPE=FAX;TYPE=WORK:work fax
+TEL;TYPE=HOME:homephone
+TEL;TYPE=CELL:mobilephone
+TEL;TYPE=FAX;TYPE=HOME:homefax
+TEL;TYPE=MSG:messenger
+TEL;TYPE=FAX;TYPE=PREF:fax
+TEL;TYPE=VIDEO:vidoe
+TEL;TYPE=MODEM:modem
+TEL;TYPE=ISDN:isdn
+TEL;TYPE=PAGER:pager
+TEL;TYPE=BBS:mailbox
+TEL;TYPE=CAR:car
+TEL;TYPE=PCS:pcs
+UID:aZAQgtBIOB
+URL:homepage
+VERSION:2.1
+X-KADDRESSBOOK-CRYPTOENCRYPTPREF;CHARSET=UTF-8;ENCODING=8BIT:alwaysIfPossib
+ le
+X-KADDRESSBOOK-CRYPTOPROTOPREF;CHARSET=UTF-8;ENCODING=8BIT:inline openpgp,o
+ penpgp/mime,s/mime,s/mime opaque
+X-KADDRESSBOOK-CRYPTOSIGNPREF;CHARSET=UTF-8;ENCODING=8BIT:never
+X-KADDRESSBOOK-OPENPGPFP;CHARSET=UTF-8;ENCODING=8BIT:C754DDC1ECF537C4805710
+ FDABDCFBBFD93D51A9
+X-KADDRESSBOOK-X-Anniversary;CHARSET=UTF-8;ENCODING=8BIT:2005-02-10
+X-KADDRESSBOOK-X-AssistantsName;CHARSET=UTF-8;ENCODING=8BIT:assistant
+X-KADDRESSBOOK-X-Department;CHARSET=UTF-8;ENCODING=8BIT:department
+X-KADDRESSBOOK-X-IMAddress;CHARSET=UTF-8;ENCODING=8BIT:im address
+X-KADDRESSBOOK-X-ManagersName;CHARSET=UTF-8;ENCODING=8BIT:manager
+X-KADDRESSBOOK-X-Office;CHARSET=UTF-8;ENCODING=8BIT:office
+X-KADDRESSBOOK-X-Profession;CHARSET=UTF-8;ENCODING=8BIT:profession
+X-KADDRESSBOOK-X-SpousesName;CHARSET=UTF-8;ENCODING=8BIT:spouse
+X-messaging/aim-All;CHARSET=UTF-8;ENCODING=8BIT:aim
+X-messaging/gadu-All;CHARSET=UTF-8;ENCODING=8BIT:gadugadu
+X-messaging/icq-All;CHARSET=UTF-8;ENCODING=8BIT:icq
+X-messaging/irc-All;CHARSET=UTF-8;ENCODING=8BIT:irc
+X-messaging/msn-All;CHARSET=UTF-8;ENCODING=8BIT:msn
+X-messaging/sms-All;CHARSET=UTF-8;ENCODING=8BIT:im sms
+X-messaging/xmpp-All;CHARSET=UTF-8;ENCODING=8BIT:jabber
+X-messaging/yahoo-All;CHARSET=UTF-8;ENCODING=8BIT:yahoo
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-full2-3.0.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-full2-3.0.vcf
new file mode 100644
index 00000000..7975ce6a
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-full2-3.0.vcf
@@ -0,0 +1,75 @@
+BEGIN:VCARD
+ADR;TYPE=work:pobox2;;Street1 work;locale2;region2;postalcode2;Germany
+ADR;TYPE=home;TYPE=pref:pobox1;;HomeAddress1;local1;region1;postalcode1;Ger
+ many
+BDAY:2005-02-26T00:00:00Z
+CATEGORIES:Customer,Family
+CLASS:PRIVATE
+EMAIL;TYPE=PREF:email1
+EMAIL:email2@test.com
+FN:givenname familynames
+GEO:52.500000;13.366667
+KEY;ENCODING=b;TYPE=PGP:mQGiBECXtzARBAC99Ll8ePW6FCzq8KUBwEYzo+J/u4EmkgCxgWm
+ Vzsvj2Uu7/OhwFaGJcv+fBSF+XtGhZeUk+Pcl4x0tMY5H07/k6ObF8+0O164J+Jg5bMlk2I6X1n
+ UhmAA4aIZCALHwcNZCq9b7HMKr3Sh1eMas2MQ2hL7mTrkfrcxqSNmTA1l/BwCgo+yOOozD6kohz
+ nRr+8jiYimho30EAJDN9YKkTh3kM1jrc9Q11N7zEnQUXtPC4GqQmW7BXgEmSBErEduk3N9NqnzG
+ xFruQrpXWisExv4z/t67uBou++m64J/Ad+T6wC19h72U15UVch/4bU7YqACjdlocUBfmnV3njko
+ Dhl6wmg7fxdCOJfkCXw+VKD9iiqXiSlqFh3IjA/4hdl3npIPKa0EeDnHDSUIbtZAd74i3Lzz1fJ
+ h5vip5N3alqSynJPmzPCWE7dMzOB/iPb+G50X046QT2OEypN9L5Trd5KJonlg+crN/aUZSjCmCC
+ foaBiISdox753MkVOipWH15F27KOqPHBNLrCnrYVCLMNpN/4aSbrn7AXzjbELQlQXJtaW4gQmF1
+ ZXIgPGFybWluLmJhdWVyQGRlc3Njb24uY29tPoheBBMRAgAeBQJAl7cwAhsDBgsJCAcDAgMVAgM
+ DFgIBAh4BAheAAAoJEKvc+7/ZPVGpDNQAmwaN2121JO3i3AcRT5ns8KeQU2x2AJ9w5i2jQ5gZ4m
+ 3jVJPFohsL03i2hbQgQXJtaW4gQmF1ZXIgPGF6cmFlbEBkZXNzY29uLmNvbT6IXgQTEQIAHgUCQ
+ Je5JQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRCr3Pu/2T1RqfVrAJ9ANz3hB4TqVahybg8i
+ XJUfmOtjbACfSLJBPGBI84P/RIEe7FKCDC05ZT65AQ0EQJe3MBAEALFujyLPriDAyh0+u8KXoBf
+ SSrnyrDnjvhG0gGsyqSfE06JvKDK6q0ZUlRAj/1cbHS+Rb8t6mUN8HquVjPkWG6eNhcGNnRxjc+
+ 7OqCiVhN7rt4c2HibVQWLy/8y04/Uqj2F9TwaiiuixIJiVA0tdqdgPxFFSCS6aRJhJ6EBw+rbXA
+ AMFBACtsn+fb3aQlaFiBurznAHmv/j2X3k2WXtaubPkNKEWf7HyLos0F5vSw0/hh0/YBabdpaK8
+ LNNuP3Q0ABPjUzyK7cH5fxHPb8BWKIKvB5aXAPr4fMFnRmvpzKmmV1yxegHQvmnpZEloODtWa1J
+ /qNq8OlFhks4tVFyxj7uKmRF1yIhJBBgRAgAJBQJAl7cwAhsMAAoJEKvc+7/ZPVGpqaoAn0yTGk
+ 6w/agEpgjKrsDAACV3l8mpAJ9X3AzwPCKMIx+NpIetkoKFroWxrQ==
+N:familynames;givenname;additional names;prefix;suffix
+NICKNAME:nickname
+NOTE:This is a note!
+ORG:organization
+ROLE:role
+TEL;TYPE=WORK:workphone
+TEL;TYPE=FAX;TYPE=WORK:work fax
+TEL;TYPE=HOME:homephone
+TEL;TYPE=CELL:mobilephone
+TEL;TYPE=FAX;TYPE=HOME:homefax
+TEL;TYPE=MSG:messenger
+TEL;TYPE=FAX;TYPE=PREF:fax
+TEL;TYPE=VIDEO:vidoe
+TEL;TYPE=MODEM:modem
+TEL;TYPE=ISDN:isdn
+TEL;TYPE=PAGER:pager
+TEL;TYPE=BBS:mailbox
+TEL;TYPE=CAR:car
+TEL;TYPE=PCS:pcs
+UID:aZAQgtBIOB
+URL:homepage
+VERSION:3.0
+X-KADDRESSBOOK-CRYPTOENCRYPTPREF:alwaysIfPossible
+X-KADDRESSBOOK-CRYPTOPROTOPREF:inline openpgp,openpgp/mime,s/mime,s/mime op
+ aque
+X-KADDRESSBOOK-CRYPTOSIGNPREF:never
+X-KADDRESSBOOK-OPENPGPFP:C754DDC1ECF537C4805710FDABDCFBBFD93D51A9
+X-KADDRESSBOOK-X-Anniversary:2005-02-10
+X-KADDRESSBOOK-X-AssistantsName:assistant
+X-KADDRESSBOOK-X-Department:department
+X-KADDRESSBOOK-X-IMAddress:im address
+X-KADDRESSBOOK-X-ManagersName:manager
+X-KADDRESSBOOK-X-Office:office
+X-KADDRESSBOOK-X-Profession:profession
+X-KADDRESSBOOK-X-SpousesName:spouse
+X-messaging/aim-All:aim
+X-messaging/gadu-All:gadugadu
+X-messaging/icq-All:icq
+X-messaging/irc-All:irc
+X-messaging/msn-All:msn
+X-messaging/sms-All:im sms
+X-messaging/xmpp-All:jabber
+X-messaging/yahoo-All:yahoo
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-multiline-2.1.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-multiline-2.1.vcf
new file mode 100644
index 00000000..dc500211
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-multiline-2.1.vcf
@@ -0,0 +1,78 @@
+BEGIN:VCARD
+ADR;CHARSET=UTF-8;ENCODING=8BIT;TYPE=work:pobox2;;Street1 work;locale2;regi
+ on2;postalcode2;Germany
+ADR;CHARSET=UTF-8;ENCODING=8BIT;TYPE=home;TYPE=pref:pobox1;;HomeAddress1\nm
+ ultine;local1;region1;postalcode1;Germany
+BDAY:2005-02-26T00:00:00Z
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT;TYPE=PREF:email1
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT:email2@test.com
+FN;CHARSET=UTF-8;ENCODING=8BIT:givenname familynames
+GEO:52.500000;13.366667
+KEY;ENCODING=b;TYPE=PGP:mQGiBECXtzARBAC99Ll8ePW6FCzq8KUBwEYzo+J/u4EmkgCxgWm
+ Vzsvj2Uu7/OhwFaGJcv+fBSF+XtGhZeUk+Pcl4x0tMY5H07/k6ObF8+0O164J+Jg5bMlk2I6X1n
+ UhmAA4aIZCALHwcNZCq9b7HMKr3Sh1eMas2MQ2hL7mTrkfrcxqSNmTA1l/BwCgo+yOOozD6kohz
+ nRr+8jiYimho30EAJDN9YKkTh3kM1jrc9Q11N7zEnQUXtPC4GqQmW7BXgEmSBErEduk3N9NqnzG
+ xFruQrpXWisExv4z/t67uBou++m64J/Ad+T6wC19h72U15UVch/4bU7YqACjdlocUBfmnV3njko
+ Dhl6wmg7fxdCOJfkCXw+VKD9iiqXiSlqFh3IjA/4hdl3npIPKa0EeDnHDSUIbtZAd74i3Lzz1fJ
+ h5vip5N3alqSynJPmzPCWE7dMzOB/iPb+G50X046QT2OEypN9L5Trd5KJonlg+crN/aUZSjCmCC
+ foaBiISdox753MkVOipWH15F27KOqPHBNLrCnrYVCLMNpN/4aSbrn7AXzjbELQlQXJtaW4gQmF1
+ ZXIgPGFybWluLmJhdWVyQGRlc3Njb24uY29tPoheBBMRAgAeBQJAl7cwAhsDBgsJCAcDAgMVAgM
+ DFgIBAh4BAheAAAoJEKvc+7/ZPVGpDNQAmwaN2121JO3i3AcRT5ns8KeQU2x2AJ9w5i2jQ5gZ4m
+ 3jVJPFohsL03i2hbQgQXJtaW4gQmF1ZXIgPGF6cmFlbEBkZXNzY29uLmNvbT6IXgQTEQIAHgUCQ
+ Je5JQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRCr3Pu/2T1RqfVrAJ9ANz3hB4TqVahybg8i
+ XJUfmOtjbACfSLJBPGBI84P/RIEe7FKCDC05ZT65AQ0EQJe3MBAEALFujyLPriDAyh0+u8KXoBf
+ SSrnyrDnjvhG0gGsyqSfE06JvKDK6q0ZUlRAj/1cbHS+Rb8t6mUN8HquVjPkWG6eNhcGNnRxjc+
+ 7OqCiVhN7rt4c2HibVQWLy/8y04/Uqj2F9TwaiiuixIJiVA0tdqdgPxFFSCS6aRJhJ6EBw+rbXA
+ AMFBACtsn+fb3aQlaFiBurznAHmv/j2X3k2WXtaubPkNKEWf7HyLos0F5vSw0/hh0/YBabdpaK8
+ LNNuP3Q0ABPjUzyK7cH5fxHPb8BWKIKvB5aXAPr4fMFnRmvpzKmmV1yxegHQvmnpZEloODtWa1J
+ /qNq8OlFhks4tVFyxj7uKmRF1yIhJBBgRAgAJBQJAl7cwAhsMAAoJEKvc+7/ZPVGpqaoAn0yTGk
+ 6w/agEpgjKrsDAACV3l8mpAJ9X3AzwPCKMIx+NpIetkoKFroWxrQ==
+N;CHARSET=UTF-8;ENCODING=8BIT:familynames;givenname;additional names;prefix
+ ;suffix
+NOTE;CHARSET=UTF-8;ENCODING=8BIT:This is a multine note!\nwith\nmultiple\nl
+ ines
+ORG;CHARSET=UTF-8;ENCODING=8BIT:organization
+ROLE;CHARSET=UTF-8;ENCODING=8BIT:role
+SOUND;VALUE=URI:/usr/share/sounds/KDE_Event_5.ogg
+TEL;TYPE=WORK:workphone
+TEL;TYPE=FAX;TYPE=WORK:work fax
+TEL;TYPE=HOME:homephone
+TEL;TYPE=CELL:mobilephone
+TEL;TYPE=FAX;TYPE=HOME:homefax
+TEL;TYPE=MSG:messenger
+TEL;TYPE=FAX;TYPE=PREF:fax
+TEL;TYPE=VIDEO:vidoe
+TEL;TYPE=MODEM:modem
+TEL;TYPE=ISDN:isdn
+TEL;TYPE=PAGER:pager
+TEL;TYPE=BBS:mailbox
+TEL;TYPE=CAR:car
+TEL;TYPE=PCS:pcs
+UID:aZAQgtBIOB
+URL:homepage
+VERSION:2.1
+X-KADDRESSBOOK-CRYPTOENCRYPTPREF;CHARSET=UTF-8;ENCODING=8BIT:alwaysIfPossib
+ le
+X-KADDRESSBOOK-CRYPTOPROTOPREF;CHARSET=UTF-8;ENCODING=8BIT:inline openpgp,o
+ penpgp/mime,s/mime,s/mime opaque
+X-KADDRESSBOOK-CRYPTOSIGNPREF;CHARSET=UTF-8;ENCODING=8BIT:never
+X-KADDRESSBOOK-OPENPGPFP;CHARSET=UTF-8;ENCODING=8BIT:C754DDC1ECF537C4805710
+ FDABDCFBBFD93D51A9
+X-KADDRESSBOOK-X-Anniversary;CHARSET=UTF-8;ENCODING=8BIT:2005-02-10
+X-KADDRESSBOOK-X-AssistantsName;CHARSET=UTF-8;ENCODING=8BIT:assistant
+X-KADDRESSBOOK-X-Department;CHARSET=UTF-8;ENCODING=8BIT:department
+X-KADDRESSBOOK-X-IMAddress;CHARSET=UTF-8;ENCODING=8BIT:im address
+X-KADDRESSBOOK-X-ManagersName;CHARSET=UTF-8;ENCODING=8BIT:manager
+X-KADDRESSBOOK-X-Office;CHARSET=UTF-8;ENCODING=8BIT:office
+X-KADDRESSBOOK-X-Profession;CHARSET=UTF-8;ENCODING=8BIT:profession
+X-KADDRESSBOOK-X-SpousesName;CHARSET=UTF-8;ENCODING=8BIT:spouse
+X-messaging/aim-All;CHARSET=UTF-8;ENCODING=8BIT:aim
+X-messaging/gadu-All;CHARSET=UTF-8;ENCODING=8BIT:gadugadu
+X-messaging/icq-All;CHARSET=UTF-8;ENCODING=8BIT:icq
+X-messaging/irc-All;CHARSET=UTF-8;ENCODING=8BIT:irc
+X-messaging/msn-All;CHARSET=UTF-8;ENCODING=8BIT:msn
+X-messaging/sms-All;CHARSET=UTF-8;ENCODING=8BIT:im sms
+X-messaging/xmpp-All;CHARSET=UTF-8;ENCODING=8BIT:jabber
+X-messaging/yahoo-All;CHARSET=UTF-8;ENCODING=8BIT:yahoo
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-multiline-3.0.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-multiline-3.0.vcf
new file mode 100644
index 00000000..15ef5bb1
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-multiline-3.0.vcf
@@ -0,0 +1,76 @@
+BEGIN:VCARD
+ADR;TYPE=work:pobox2;;Street1 work;locale2;region2;postalcode2;Germany
+ADR;TYPE=home;TYPE=pref:pobox1;;HomeAddress1\nmultine;local1;region1;postal
+ code1;Germany
+BDAY:2005-02-26T00:00:00Z
+CATEGORIES:Customer,Family
+CLASS:PRIVATE
+EMAIL;TYPE=PREF:email1
+EMAIL:email2@test.com
+FN:givenname familynames
+GEO:52.500000;13.366667
+KEY;ENCODING=b;TYPE=PGP:mQGiBECXtzARBAC99Ll8ePW6FCzq8KUBwEYzo+J/u4EmkgCxgWm
+ Vzsvj2Uu7/OhwFaGJcv+fBSF+XtGhZeUk+Pcl4x0tMY5H07/k6ObF8+0O164J+Jg5bMlk2I6X1n
+ UhmAA4aIZCALHwcNZCq9b7HMKr3Sh1eMas2MQ2hL7mTrkfrcxqSNmTA1l/BwCgo+yOOozD6kohz
+ nRr+8jiYimho30EAJDN9YKkTh3kM1jrc9Q11N7zEnQUXtPC4GqQmW7BXgEmSBErEduk3N9NqnzG
+ xFruQrpXWisExv4z/t67uBou++m64J/Ad+T6wC19h72U15UVch/4bU7YqACjdlocUBfmnV3njko
+ Dhl6wmg7fxdCOJfkCXw+VKD9iiqXiSlqFh3IjA/4hdl3npIPKa0EeDnHDSUIbtZAd74i3Lzz1fJ
+ h5vip5N3alqSynJPmzPCWE7dMzOB/iPb+G50X046QT2OEypN9L5Trd5KJonlg+crN/aUZSjCmCC
+ foaBiISdox753MkVOipWH15F27KOqPHBNLrCnrYVCLMNpN/4aSbrn7AXzjbELQlQXJtaW4gQmF1
+ ZXIgPGFybWluLmJhdWVyQGRlc3Njb24uY29tPoheBBMRAgAeBQJAl7cwAhsDBgsJCAcDAgMVAgM
+ DFgIBAh4BAheAAAoJEKvc+7/ZPVGpDNQAmwaN2121JO3i3AcRT5ns8KeQU2x2AJ9w5i2jQ5gZ4m
+ 3jVJPFohsL03i2hbQgQXJtaW4gQmF1ZXIgPGF6cmFlbEBkZXNzY29uLmNvbT6IXgQTEQIAHgUCQ
+ Je5JQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRCr3Pu/2T1RqfVrAJ9ANz3hB4TqVahybg8i
+ XJUfmOtjbACfSLJBPGBI84P/RIEe7FKCDC05ZT65AQ0EQJe3MBAEALFujyLPriDAyh0+u8KXoBf
+ SSrnyrDnjvhG0gGsyqSfE06JvKDK6q0ZUlRAj/1cbHS+Rb8t6mUN8HquVjPkWG6eNhcGNnRxjc+
+ 7OqCiVhN7rt4c2HibVQWLy/8y04/Uqj2F9TwaiiuixIJiVA0tdqdgPxFFSCS6aRJhJ6EBw+rbXA
+ AMFBACtsn+fb3aQlaFiBurznAHmv/j2X3k2WXtaubPkNKEWf7HyLos0F5vSw0/hh0/YBabdpaK8
+ LNNuP3Q0ABPjUzyK7cH5fxHPb8BWKIKvB5aXAPr4fMFnRmvpzKmmV1yxegHQvmnpZEloODtWa1J
+ /qNq8OlFhks4tVFyxj7uKmRF1yIhJBBgRAgAJBQJAl7cwAhsMAAoJEKvc+7/ZPVGpqaoAn0yTGk
+ 6w/agEpgjKrsDAACV3l8mpAJ9X3AzwPCKMIx+NpIetkoKFroWxrQ==
+N:familynames;givenname;additional names;prefix;suffix
+NICKNAME:nickname
+NOTE:This is a multine note!\nwith\nmultiple\nlines
+ORG:organization
+ROLE:role
+SOUND;VALUE=URI:/usr/share/sounds/KDE_Event_5.ogg
+TEL;TYPE=WORK:workphone
+TEL;TYPE=FAX;TYPE=WORK:work fax
+TEL;TYPE=HOME:homephone
+TEL;TYPE=CELL:mobilephone
+TEL;TYPE=FAX;TYPE=HOME:homefax
+TEL;TYPE=MSG:messenger
+TEL;TYPE=FAX;TYPE=PREF:fax
+TEL;TYPE=VIDEO:vidoe
+TEL;TYPE=MODEM:modem
+TEL;TYPE=ISDN:isdn
+TEL;TYPE=PAGER:pager
+TEL;TYPE=BBS:mailbox
+TEL;TYPE=CAR:car
+TEL;TYPE=PCS:pcs
+UID:aZAQgtBIOB
+URL:homepage
+VERSION:3.0
+X-KADDRESSBOOK-CRYPTOENCRYPTPREF:alwaysIfPossible
+X-KADDRESSBOOK-CRYPTOPROTOPREF:inline openpgp,openpgp/mime,s/mime,s/mime op
+ aque
+X-KADDRESSBOOK-CRYPTOSIGNPREF:never
+X-KADDRESSBOOK-OPENPGPFP:C754DDC1ECF537C4805710FDABDCFBBFD93D51A9
+X-KADDRESSBOOK-X-Anniversary:2005-02-10
+X-KADDRESSBOOK-X-AssistantsName:assistant
+X-KADDRESSBOOK-X-Department:department
+X-KADDRESSBOOK-X-IMAddress:im address
+X-KADDRESSBOOK-X-ManagersName:manager
+X-KADDRESSBOOK-X-Office:office
+X-KADDRESSBOOK-X-Profession:profession
+X-KADDRESSBOOK-X-SpousesName:spouse
+X-messaging/aim-All:aim
+X-messaging/gadu-All:gadugadu
+X-messaging/icq-All:icq
+X-messaging/irc-All:irc
+X-messaging/msn-All:msn
+X-messaging/sms-All:im sms
+X-messaging/xmpp-All:jabber
+X-messaging/yahoo-All:yahoo
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-photo1-2.1.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-photo1-2.1.vcf
new file mode 100644
index 00000000..cb06cb9b
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-photo1-2.1.vcf
@@ -0,0 +1,114 @@
+BEGIN:VCARD
+ADR;CHARSET=UTF-8;ENCODING=8BIT;TYPE=work:pobox2;;Street1 work;locale2;regi
+ on2;postalcode2;Germany
+ADR;CHARSET=UTF-8;ENCODING=8BIT;TYPE=home;TYPE=pref:pobox1;;HomeAddress1;lo
+ cal1;region1;postalcode1;Germany
+BDAY:2005-02-26T00:00:00Z
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT;TYPE=PREF:email1
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT:email2@test.com
+FN;CHARSET=UTF-8;ENCODING=8BIT:givenname familynames
+GEO:52.500000;13.366667
+KEY;ENCODING=b;TYPE=PGP:mQGiBECXtzARBAC99Ll8ePW6FCzq8KUBwEYzo+J/u4EmkgCxgWm
+ Vzsvj2Uu7/OhwFaGJcv+fBSF+XtGhZeUk+Pcl4x0tMY5H07/k6ObF8+0O164J+Jg5bMlk2I6X1n
+ UhmAA4aIZCALHwcNZCq9b7HMKr3Sh1eMas2MQ2hL7mTrkfrcxqSNmTA1l/BwCgo+yOOozD6kohz
+ nRr+8jiYimho30EAJDN9YKkTh3kM1jrc9Q11N7zEnQUXtPC4GqQmW7BXgEmSBErEduk3N9NqnzG
+ xFruQrpXWisExv4z/t67uBou++m64J/Ad+T6wC19h72U15UVch/4bU7YqACjdlocUBfmnV3njko
+ Dhl6wmg7fxdCOJfkCXw+VKD9iiqXiSlqFh3IjA/4hdl3npIPKa0EeDnHDSUIbtZAd74i3Lzz1fJ
+ h5vip5N3alqSynJPmzPCWE7dMzOB/iPb+G50X046QT2OEypN9L5Trd5KJonlg+crN/aUZSjCmCC
+ foaBiISdox753MkVOipWH15F27KOqPHBNLrCnrYVCLMNpN/4aSbrn7AXzjbELQlQXJtaW4gQmF1
+ ZXIgPGFybWluLmJhdWVyQGRlc3Njb24uY29tPoheBBMRAgAeBQJAl7cwAhsDBgsJCAcDAgMVAgM
+ DFgIBAh4BAheAAAoJEKvc+7/ZPVGpDNQAmwaN2121JO3i3AcRT5ns8KeQU2x2AJ9w5i2jQ5gZ4m
+ 3jVJPFohsL03i2hbQgQXJtaW4gQmF1ZXIgPGF6cmFlbEBkZXNzY29uLmNvbT6IXgQTEQIAHgUCQ
+ Je5JQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRCr3Pu/2T1RqfVrAJ9ANz3hB4TqVahybg8i
+ XJUfmOtjbACfSLJBPGBI84P/RIEe7FKCDC05ZT65AQ0EQJe3MBAEALFujyLPriDAyh0+u8KXoBf
+ SSrnyrDnjvhG0gGsyqSfE06JvKDK6q0ZUlRAj/1cbHS+Rb8t6mUN8HquVjPkWG6eNhcGNnRxjc+
+ 7OqCiVhN7rt4c2HibVQWLy/8y04/Uqj2F9TwaiiuixIJiVA0tdqdgPxFFSCS6aRJhJ6EBw+rbXA
+ AMFBACtsn+fb3aQlaFiBurznAHmv/j2X3k2WXtaubPkNKEWf7HyLos0F5vSw0/hh0/YBabdpaK8
+ LNNuP3Q0ABPjUzyK7cH5fxHPb8BWKIKvB5aXAPr4fMFnRmvpzKmmV1yxegHQvmnpZEloODtWa1J
+ /qNq8OlFhks4tVFyxj7uKmRF1yIhJBBgRAgAJBQJAl7cwAhsMAAoJEKvc+7/ZPVGpqaoAn0yTGk
+ 6w/agEpgjKrsDAACV3l8mpAJ9X3AzwPCKMIx+NpIetkoKFroWxrQ==
+LOGO;ENCODING=b;TYPE=image/png:iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAIAAAD/gAID
+ AAAD1ElEQVR4nO2byyt1URjGH5dyyWXAiAghQwkRkswwFKZSMiD/gTIzlDIQYYiRYkYypCiFiKG
+ S5J6J+zd4favdOV9fHnvbO/X8Rus5WHv186591ll7nYSPjw+Ir5EY9QB+E5JFIFkEkkUgWQSSRS
+ BZBJJFIFkEkkUgWQSSRSBZBJJFIFkEkkUgWQSSRSBZBJJFIFkEkkUgWQSSRSBZBJJFIFkEkkUgW
+ QSSRSBZBJJFkBz1APD6+gpgcXHR4tLSEoCdnR2Ll5eXAJKSkiwWFhYCaGxstNjb2wugqakpnKGq
+ sggSojomeXx8bI2uri4A+/v73p+mpqZaIy8vD8DT05PFi4sLAG9vb95f7unpscb09DSAjIyMHxq
+ zKotAsggimIY2Ad1N+vr6GkBpaanFsbExAB0dHRZTUlK8f2u/PDc3Z3F0dBTA4+OjxYaGBgDr6+
+ sW3VwOClUWQXiV9fLyYo2qqioABwcHFqurq+Eph+zs7K/3ubu7C6C1tdXi/f09gOHhYYvj4+P+h
+ +1FlUUgWQThTUNbBAHo7+8HkJaWZtHmY0lJybd7np2dtUZfXx+A5OTPjyWnp6cAioqKvt1zDKos
+ gvAqq76+3hpbW1v4WwUAZmZmfPbsFvTFxcUAzs7OLNrCYmRkxGf/DlUWgWQRhDENbYXtFlDv7+8
+ AVldXLba3twd1ocHBQQCTk5MWm5ubAWxubgbVvyqLIIzNP3sLt4JyVFZWBn6hmD7dLlBQqLIIJI
+ sgjGlo+yox5ObmBn6hmD7/eV0/qLIIJItAsggkiyCMG3xOTk78i1dXV9bIz88P6kKuz/9c1w+qL
+ IIwKqusrAxAYuLnP8aW8nt7exYDrCzXp1FRURFUz4Yqi0CyCMKYhnb4oKamxuL29jaA5eVli/63
+ aNxH9JWVFe/rLS0tPnuOQZVFEN4e/NTUlDUGBgYApKenW7SnO7Z9/j3m5+etYce13NOdk5MTnz3
+ HoMoikCyC8Kbh8/OzNWw/8+joyGJtbS2AtbU1i1lZWV/v0xZW7kZ+d3cHYGhoyOLExIT/YXtRZR
+ FEcD7r8PAQnlOzt7e3AMrLyy3a+ay2tjaLMeezbm5u4Lmj22PUh4cHi3V1dQA2NjYsuhMCQaHKI
+ pAsgshOK9tkBNDd3e2NhjvhaB+z3ZvD+fk54k4rd3Z2WsOO02RmZv7QmFVZBJFVlsOOTy4sLFi0
+ b1jY+UfEfcOioKAAcd+wsMf0IaDKIpAsguin4S9ClUUgWQSSRSBZBJJFIFkEkkUgWQSSRSBZBJJ
+ FIFkEkkUgWQSSRSBZBJJFIFkEkkUgWQSSRfAHfPwYMZb1bW0AAAAASUVORK5CYII=
+N;CHARSET=UTF-8;ENCODING=8BIT:familynames;givenname;additional names;prefix
+ ;suffix
+NOTE;CHARSET=UTF-8;ENCODING=8BIT:This is a note!
+ORG;CHARSET=UTF-8;ENCODING=8BIT:organization
+PHOTO;ENCODING=b;TYPE=image/png:iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAIAAAD/gAI
+ DAAAD1ElEQVR4nO2byyt1URjGH5dyyWXAiAghQwkRkswwFKZSMiD/gTIzlDIQYYiRYkYypCiFiK
+ GS5J6J+zd4favdOV9fHnvbO/X8Rus5WHv186591ll7nYSPjw+Ir5EY9QB+E5JFIFkEkkUgWQSSR
+ SBZBJJFIFkEkkUgWQSSRSBZBJJFIFkEkkUgWQSSRSBZBJJFIFkEkkUgWQSSRSBZBJJFIFkEkkUg
+ WQSSRSBZBJJFkBz1APD6+gpgcXHR4tLSEoCdnR2Ll5eXAJKSkiwWFhYCaGxstNjb2wugqakpnKG
+ qsggSojomeXx8bI2uri4A+/v73p+mpqZaIy8vD8DT05PFi4sLAG9vb95f7unpscb09DSAjIyMHx
+ qzKotAsggimIY2Ad1N+vr6GkBpaanFsbExAB0dHRZTUlK8f2u/PDc3Z3F0dBTA4+OjxYaGBgDr6
+ +sW3VwOClUWQXiV9fLyYo2qqioABwcHFqurq+Eph+zs7K/3ubu7C6C1tdXi/f09gOHhYYvj4+P+
+ h+1FlUUgWQThTUNbBAHo7+8HkJaWZtHmY0lJybd7np2dtUZfXx+A5OTPjyWnp6cAioqKvt1zDKo
+ sgvAqq76+3hpbW1v4WwUAZmZmfPbsFvTFxcUAzs7OLNrCYmRkxGf/DlUWgWQRhDENbYXtFlDv7+
+ 8AVldXLba3twd1ocHBQQCTk5MWm5ubAWxubgbVvyqLIIzNP3sLt4JyVFZWBn6hmD7dLlBQqLIIJ
+ IsgjGlo+yox5ObmBn6hmD7/eV0/qLIIJItAsggkiyCMG3xOTk78i1dXV9bIz88P6kKuz/9c1w+q
+ LIIwKqusrAxAYuLnP8aW8nt7exYDrCzXp1FRURFUz4Yqi0CyCMKYhnb4oKamxuL29jaA5eVli/6
+ 3aNxH9JWVFe/rLS0tPnuOQZVFEN4e/NTUlDUGBgYApKenW7SnO7Z9/j3m5+etYce13NOdk5MTnz
+ 3HoMoikCyC8Kbh8/OzNWw/8+joyGJtbS2AtbU1i1lZWV/v0xZW7kZ+d3cHYGhoyOLExIT/YXtRZ
+ RFEcD7r8PAQnlOzt7e3AMrLyy3a+ay2tjaLMeezbm5u4Lmj22PUh4cHi3V1dQA2NjYsuhMCQaHK
+ IpAsgshOK9tkBNDd3e2NhjvhaB+z3ZvD+fk54k4rd3Z2WsOO02RmZv7QmFVZBJFVlsOOTy4sLFi
+ 0b1jY+UfEfcOioKAAcd+wsMf0IaDKIpAsguin4S9ClUUgWQSSRSBZBJJFIFkEkkUgWQSSRSBZBJ
+ JFIFkEkkUgWQSSRSBZBJJFIFkEkkUgWQSSRfAHfPwYMZb1bW0AAAAASUVORK5CYII=
+ROLE;CHARSET=UTF-8;ENCODING=8BIT:role
+TEL;TYPE=WORK:workphone
+TEL;TYPE=FAX;TYPE=WORK:work fax
+TEL;TYPE=HOME:homephone
+TEL;TYPE=CELL:mobilephone
+TEL;TYPE=FAX;TYPE=HOME:homefax
+TEL;TYPE=MSG:messenger
+TEL;TYPE=FAX;TYPE=PREF:fax
+TEL;TYPE=VIDEO:vidoe
+TEL;TYPE=MODEM:modem
+TEL;TYPE=ISDN:isdn
+TEL;TYPE=PAGER:pager
+TEL;TYPE=BBS:mailbox
+TEL;TYPE=CAR:car
+TEL;TYPE=PCS:pcs
+UID:aZAQgtBIOB
+URL:homepage
+VERSION:2.1
+X-KADDRESSBOOK-CRYPTOENCRYPTPREF;CHARSET=UTF-8;ENCODING=8BIT:alwaysIfPossib
+ le
+X-KADDRESSBOOK-CRYPTOPROTOPREF;CHARSET=UTF-8;ENCODING=8BIT:inline openpgp,o
+ penpgp/mime,s/mime,s/mime opaque
+X-KADDRESSBOOK-CRYPTOSIGNPREF;CHARSET=UTF-8;ENCODING=8BIT:never
+X-KADDRESSBOOK-OPENPGPFP;CHARSET=UTF-8;ENCODING=8BIT:C754DDC1ECF537C4805710
+ FDABDCFBBFD93D51A9
+X-KADDRESSBOOK-X-Anniversary;CHARSET=UTF-8;ENCODING=8BIT:2005-02-10
+X-KADDRESSBOOK-X-AssistantsName;CHARSET=UTF-8;ENCODING=8BIT:assistant
+X-KADDRESSBOOK-X-Department;CHARSET=UTF-8;ENCODING=8BIT:department
+X-KADDRESSBOOK-X-IMAddress;CHARSET=UTF-8;ENCODING=8BIT:im address
+X-KADDRESSBOOK-X-ManagersName;CHARSET=UTF-8;ENCODING=8BIT:manager
+X-KADDRESSBOOK-X-Office;CHARSET=UTF-8;ENCODING=8BIT:office
+X-KADDRESSBOOK-X-Profession;CHARSET=UTF-8;ENCODING=8BIT:profession
+X-KADDRESSBOOK-X-SpousesName;CHARSET=UTF-8;ENCODING=8BIT:spouse
+X-messaging/aim-All;CHARSET=UTF-8;ENCODING=8BIT:aim
+X-messaging/gadu-All;CHARSET=UTF-8;ENCODING=8BIT:gadugadu
+X-messaging/icq-All;CHARSET=UTF-8;ENCODING=8BIT:icq
+X-messaging/irc-All;CHARSET=UTF-8;ENCODING=8BIT:irc
+X-messaging/msn-All;CHARSET=UTF-8;ENCODING=8BIT:msn
+X-messaging/sms-All;CHARSET=UTF-8;ENCODING=8BIT:im sms
+X-messaging/xmpp-All;CHARSET=UTF-8;ENCODING=8BIT:jabber
+X-messaging/yahoo-All;CHARSET=UTF-8;ENCODING=8BIT:yahoo
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-photo1-3.0.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-photo1-3.0.vcf
new file mode 100644
index 00000000..79dbe4da
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-photo1-3.0.vcf
@@ -0,0 +1,113 @@
+BEGIN:VCARD
+ADR;TYPE=work:pobox2;;Street1 work;locale2;region2;postalcode2;Germany
+ADR;TYPE=home;TYPE=pref:pobox1;;HomeAddress1;local1;region1;postalcode1;Ger
+ many
+BDAY:2005-02-26T00:00:00Z
+CATEGORIES:Customer,Family
+CLASS:PRIVATE
+EMAIL;TYPE=PREF:email1
+EMAIL:email2@test.com
+FN:givenname familynames
+GEO:52.500000;13.366667
+KEY;ENCODING=b;TYPE=PGP:mQGiBECXtzARBAC99Ll8ePW6FCzq8KUBwEYzo+J/u4EmkgCxgWm
+ Vzsvj2Uu7/OhwFaGJcv+fBSF+XtGhZeUk+Pcl4x0tMY5H07/k6ObF8+0O164J+Jg5bMlk2I6X1n
+ UhmAA4aIZCALHwcNZCq9b7HMKr3Sh1eMas2MQ2hL7mTrkfrcxqSNmTA1l/BwCgo+yOOozD6kohz
+ nRr+8jiYimho30EAJDN9YKkTh3kM1jrc9Q11N7zEnQUXtPC4GqQmW7BXgEmSBErEduk3N9NqnzG
+ xFruQrpXWisExv4z/t67uBou++m64J/Ad+T6wC19h72U15UVch/4bU7YqACjdlocUBfmnV3njko
+ Dhl6wmg7fxdCOJfkCXw+VKD9iiqXiSlqFh3IjA/4hdl3npIPKa0EeDnHDSUIbtZAd74i3Lzz1fJ
+ h5vip5N3alqSynJPmzPCWE7dMzOB/iPb+G50X046QT2OEypN9L5Trd5KJonlg+crN/aUZSjCmCC
+ foaBiISdox753MkVOipWH15F27KOqPHBNLrCnrYVCLMNpN/4aSbrn7AXzjbELQlQXJtaW4gQmF1
+ ZXIgPGFybWluLmJhdWVyQGRlc3Njb24uY29tPoheBBMRAgAeBQJAl7cwAhsDBgsJCAcDAgMVAgM
+ DFgIBAh4BAheAAAoJEKvc+7/ZPVGpDNQAmwaN2121JO3i3AcRT5ns8KeQU2x2AJ9w5i2jQ5gZ4m
+ 3jVJPFohsL03i2hbQgQXJtaW4gQmF1ZXIgPGF6cmFlbEBkZXNzY29uLmNvbT6IXgQTEQIAHgUCQ
+ Je5JQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRCr3Pu/2T1RqfVrAJ9ANz3hB4TqVahybg8i
+ XJUfmOtjbACfSLJBPGBI84P/RIEe7FKCDC05ZT65AQ0EQJe3MBAEALFujyLPriDAyh0+u8KXoBf
+ SSrnyrDnjvhG0gGsyqSfE06JvKDK6q0ZUlRAj/1cbHS+Rb8t6mUN8HquVjPkWG6eNhcGNnRxjc+
+ 7OqCiVhN7rt4c2HibVQWLy/8y04/Uqj2F9TwaiiuixIJiVA0tdqdgPxFFSCS6aRJhJ6EBw+rbXA
+ AMFBACtsn+fb3aQlaFiBurznAHmv/j2X3k2WXtaubPkNKEWf7HyLos0F5vSw0/hh0/YBabdpaK8
+ LNNuP3Q0ABPjUzyK7cH5fxHPb8BWKIKvB5aXAPr4fMFnRmvpzKmmV1yxegHQvmnpZEloODtWa1J
+ /qNq8OlFhks4tVFyxj7uKmRF1yIhJBBgRAgAJBQJAl7cwAhsMAAoJEKvc+7/ZPVGpqaoAn0yTGk
+ 6w/agEpgjKrsDAACV3l8mpAJ9X3AzwPCKMIx+NpIetkoKFroWxrQ==
+LOGO;ENCODING=b;TYPE=image/png:iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAIAAAD/gAID
+ AAAD1ElEQVR4nO2byyt1URjGH5dyyWXAiAghQwkRkswwFKZSMiD/gTIzlDIQYYiRYkYypCiFiKG
+ S5J6J+zd4favdOV9fHnvbO/X8Rus5WHv186591ll7nYSPjw+Ir5EY9QB+E5JFIFkEkkUgWQSSRS
+ BZBJJFIFkEkkUgWQSSRSBZBJJFIFkEkkUgWQSSRSBZBJJFIFkEkkUgWQSSRSBZBJJFIFkEkkUgW
+ QSSRSBZBJJFkBz1APD6+gpgcXHR4tLSEoCdnR2Ll5eXAJKSkiwWFhYCaGxstNjb2wugqakpnKGq
+ sggSojomeXx8bI2uri4A+/v73p+mpqZaIy8vD8DT05PFi4sLAG9vb95f7unpscb09DSAjIyMHxq
+ zKotAsggimIY2Ad1N+vr6GkBpaanFsbExAB0dHRZTUlK8f2u/PDc3Z3F0dBTA4+OjxYaGBgDr6+
+ sW3VwOClUWQXiV9fLyYo2qqioABwcHFqurq+Eph+zs7K/3ubu7C6C1tdXi/f09gOHhYYvj4+P+h
+ +1FlUUgWQThTUNbBAHo7+8HkJaWZtHmY0lJybd7np2dtUZfXx+A5OTPjyWnp6cAioqKvt1zDKos
+ gvAqq76+3hpbW1v4WwUAZmZmfPbsFvTFxcUAzs7OLNrCYmRkxGf/DlUWgWQRhDENbYXtFlDv7+8
+ AVldXLba3twd1ocHBQQCTk5MWm5ubAWxubgbVvyqLIIzNP3sLt4JyVFZWBn6hmD7dLlBQqLIIJI
+ sgjGlo+yox5ObmBn6hmD7/eV0/qLIIJItAsggkiyCMG3xOTk78i1dXV9bIz88P6kKuz/9c1w+qL
+ IIwKqusrAxAYuLnP8aW8nt7exYDrCzXp1FRURFUz4Yqi0CyCMKYhnb4oKamxuL29jaA5eVli/63
+ aNxH9JWVFe/rLS0tPnuOQZVFEN4e/NTUlDUGBgYApKenW7SnO7Z9/j3m5+etYce13NOdk5MTnz3
+ HoMoikCyC8Kbh8/OzNWw/8+joyGJtbS2AtbU1i1lZWV/v0xZW7kZ+d3cHYGhoyOLExIT/YXtRZR
+ FEcD7r8PAQnlOzt7e3AMrLyy3a+ay2tjaLMeezbm5u4Lmj22PUh4cHi3V1dQA2NjYsuhMCQaHKI
+ pAsgshOK9tkBNDd3e2NhjvhaB+z3ZvD+fk54k4rd3Z2WsOO02RmZv7QmFVZBJFVlsOOTy4sLFi0
+ b1jY+UfEfcOioKAAcd+wsMf0IaDKIpAsguin4S9ClUUgWQSSRSBZBJJFIFkEkkUgWQSSRSBZBJJ
+ FIFkEkkUgWQSSRSBZBJJFIFkEkkUgWQSSRfAHfPwYMZb1bW0AAAAASUVORK5CYII=
+N:familynames;givenname;additional names;prefix;suffix
+NICKNAME:nickname
+NOTE:This is a note!
+ORG:organization
+PHOTO;ENCODING=b;TYPE=image/png:iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAIAAAD/gAI
+ DAAAD1ElEQVR4nO2byyt1URjGH5dyyWXAiAghQwkRkswwFKZSMiD/gTIzlDIQYYiRYkYypCiFiK
+ GS5J6J+zd4favdOV9fHnvbO/X8Rus5WHv186591ll7nYSPjw+Ir5EY9QB+E5JFIFkEkkUgWQSSR
+ SBZBJJFIFkEkkUgWQSSRSBZBJJFIFkEkkUgWQSSRSBZBJJFIFkEkkUgWQSSRSBZBJJFIFkEkkUg
+ WQSSRSBZBJJFkBz1APD6+gpgcXHR4tLSEoCdnR2Ll5eXAJKSkiwWFhYCaGxstNjb2wugqakpnKG
+ qsggSojomeXx8bI2uri4A+/v73p+mpqZaIy8vD8DT05PFi4sLAG9vb95f7unpscb09DSAjIyMHx
+ qzKotAsggimIY2Ad1N+vr6GkBpaanFsbExAB0dHRZTUlK8f2u/PDc3Z3F0dBTA4+OjxYaGBgDr6
+ +sW3VwOClUWQXiV9fLyYo2qqioABwcHFqurq+Eph+zs7K/3ubu7C6C1tdXi/f09gOHhYYvj4+P+
+ h+1FlUUgWQThTUNbBAHo7+8HkJaWZtHmY0lJybd7np2dtUZfXx+A5OTPjyWnp6cAioqKvt1zDKo
+ sgvAqq76+3hpbW1v4WwUAZmZmfPbsFvTFxcUAzs7OLNrCYmRkxGf/DlUWgWQRhDENbYXtFlDv7+
+ 8AVldXLba3twd1ocHBQQCTk5MWm5ubAWxubgbVvyqLIIzNP3sLt4JyVFZWBn6hmD7dLlBQqLIIJ
+ IsgjGlo+yox5ObmBn6hmD7/eV0/qLIIJItAsggkiyCMG3xOTk78i1dXV9bIz88P6kKuz/9c1w+q
+ LIIwKqusrAxAYuLnP8aW8nt7exYDrCzXp1FRURFUz4Yqi0CyCMKYhnb4oKamxuL29jaA5eVli/6
+ 3aNxH9JWVFe/rLS0tPnuOQZVFEN4e/NTUlDUGBgYApKenW7SnO7Z9/j3m5+etYce13NOdk5MTnz
+ 3HoMoikCyC8Kbh8/OzNWw/8+joyGJtbS2AtbU1i1lZWV/v0xZW7kZ+d3cHYGhoyOLExIT/YXtRZ
+ RFEcD7r8PAQnlOzt7e3AMrLyy3a+ay2tjaLMeezbm5u4Lmj22PUh4cHi3V1dQA2NjYsuhMCQaHK
+ IpAsgshOK9tkBNDd3e2NhjvhaB+z3ZvD+fk54k4rd3Z2WsOO02RmZv7QmFVZBJFVlsOOTy4sLFi
+ 0b1jY+UfEfcOioKAAcd+wsMf0IaDKIpAsguin4S9ClUUgWQSSRSBZBJJFIFkEkkUgWQSSRSBZBJ
+ JFIFkEkkUgWQSSRSBZBJJFIFkEkkUgWQSSRfAHfPwYMZb1bW0AAAAASUVORK5CYII=
+ROLE:role
+TEL;TYPE=WORK:workphone
+TEL;TYPE=FAX;TYPE=WORK:work fax
+TEL;TYPE=HOME:homephone
+TEL;TYPE=CELL:mobilephone
+TEL;TYPE=FAX;TYPE=HOME:homefax
+TEL;TYPE=MSG:messenger
+TEL;TYPE=FAX;TYPE=PREF:fax
+TEL;TYPE=VIDEO:vidoe
+TEL;TYPE=MODEM:modem
+TEL;TYPE=ISDN:isdn
+TEL;TYPE=PAGER:pager
+TEL;TYPE=BBS:mailbox
+TEL;TYPE=CAR:car
+TEL;TYPE=PCS:pcs
+UID:aZAQgtBIOB
+URL:homepage
+VERSION:3.0
+X-KADDRESSBOOK-CRYPTOENCRYPTPREF:alwaysIfPossible
+X-KADDRESSBOOK-CRYPTOPROTOPREF:inline openpgp,openpgp/mime,s/mime,s/mime op
+ aque
+X-KADDRESSBOOK-CRYPTOSIGNPREF:never
+X-KADDRESSBOOK-OPENPGPFP:C754DDC1ECF537C4805710FDABDCFBBFD93D51A9
+X-KADDRESSBOOK-X-Anniversary:2005-02-10
+X-KADDRESSBOOK-X-AssistantsName:assistant
+X-KADDRESSBOOK-X-Department:department
+X-KADDRESSBOOK-X-IMAddress:im address
+X-KADDRESSBOOK-X-ManagersName:manager
+X-KADDRESSBOOK-X-Office:office
+X-KADDRESSBOOK-X-Profession:profession
+X-KADDRESSBOOK-X-SpousesName:spouse
+X-messaging/aim-All:aim
+X-messaging/gadu-All:gadugadu
+X-messaging/icq-All:icq
+X-messaging/irc-All:irc
+X-messaging/msn-All:msn
+X-messaging/sms-All:im sms
+X-messaging/xmpp-All:jabber
+X-messaging/yahoo-All:yahoo
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-photo2-2.1.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-photo2-2.1.vcf
new file mode 100644
index 00000000..c0e9c712
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-photo2-2.1.vcf
@@ -0,0 +1,78 @@
+BEGIN:VCARD
+ADR;CHARSET=UTF-8;ENCODING=8BIT;TYPE=work:pobox2;;Street1 work;locale2;regi
+ on2;postalcode2;Germany
+ADR;CHARSET=UTF-8;ENCODING=8BIT;TYPE=home;TYPE=pref:pobox1;;HomeAddress1;lo
+ cal1;region1;postalcode1;Germany
+BDAY:2005-02-26T00:00:00Z
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT;TYPE=PREF:email1
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT:email2@test.com
+FN;CHARSET=UTF-8;ENCODING=8BIT:givenname familynames
+GEO:52.500000;13.366667
+KEY;ENCODING=b;TYPE=PGP:mQGiBECXtzARBAC99Ll8ePW6FCzq8KUBwEYzo+J/u4EmkgCxgWm
+ Vzsvj2Uu7/OhwFaGJcv+fBSF+XtGhZeUk+Pcl4x0tMY5H07/k6ObF8+0O164J+Jg5bMlk2I6X1n
+ UhmAA4aIZCALHwcNZCq9b7HMKr3Sh1eMas2MQ2hL7mTrkfrcxqSNmTA1l/BwCgo+yOOozD6kohz
+ nRr+8jiYimho30EAJDN9YKkTh3kM1jrc9Q11N7zEnQUXtPC4GqQmW7BXgEmSBErEduk3N9NqnzG
+ xFruQrpXWisExv4z/t67uBou++m64J/Ad+T6wC19h72U15UVch/4bU7YqACjdlocUBfmnV3njko
+ Dhl6wmg7fxdCOJfkCXw+VKD9iiqXiSlqFh3IjA/4hdl3npIPKa0EeDnHDSUIbtZAd74i3Lzz1fJ
+ h5vip5N3alqSynJPmzPCWE7dMzOB/iPb+G50X046QT2OEypN9L5Trd5KJonlg+crN/aUZSjCmCC
+ foaBiISdox753MkVOipWH15F27KOqPHBNLrCnrYVCLMNpN/4aSbrn7AXzjbELQlQXJtaW4gQmF1
+ ZXIgPGFybWluLmJhdWVyQGRlc3Njb24uY29tPoheBBMRAgAeBQJAl7cwAhsDBgsJCAcDAgMVAgM
+ DFgIBAh4BAheAAAoJEKvc+7/ZPVGpDNQAmwaN2121JO3i3AcRT5ns8KeQU2x2AJ9w5i2jQ5gZ4m
+ 3jVJPFohsL03i2hbQgQXJtaW4gQmF1ZXIgPGF6cmFlbEBkZXNzY29uLmNvbT6IXgQTEQIAHgUCQ
+ Je5JQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRCr3Pu/2T1RqfVrAJ9ANz3hB4TqVahybg8i
+ XJUfmOtjbACfSLJBPGBI84P/RIEe7FKCDC05ZT65AQ0EQJe3MBAEALFujyLPriDAyh0+u8KXoBf
+ SSrnyrDnjvhG0gGsyqSfE06JvKDK6q0ZUlRAj/1cbHS+Rb8t6mUN8HquVjPkWG6eNhcGNnRxjc+
+ 7OqCiVhN7rt4c2HibVQWLy/8y04/Uqj2F9TwaiiuixIJiVA0tdqdgPxFFSCS6aRJhJ6EBw+rbXA
+ AMFBACtsn+fb3aQlaFiBurznAHmv/j2X3k2WXtaubPkNKEWf7HyLos0F5vSw0/hh0/YBabdpaK8
+ LNNuP3Q0ABPjUzyK7cH5fxHPb8BWKIKvB5aXAPr4fMFnRmvpzKmmV1yxegHQvmnpZEloODtWa1J
+ /qNq8OlFhks4tVFyxj7uKmRF1yIhJBBgRAgAJBQJAl7cwAhsMAAoJEKvc+7/ZPVGpqaoAn0yTGk
+ 6w/agEpgjKrsDAACV3l8mpAJ9X3AzwPCKMIx+NpIetkoKFroWxrQ==
+LOGO;VALUE=URI:/home/azrael/vcard.png
+N;CHARSET=UTF-8;ENCODING=8BIT:familynames;givenname;additional names;prefix
+ ;suffix
+NOTE;CHARSET=UTF-8;ENCODING=8BIT:This is a note!
+ORG;CHARSET=UTF-8;ENCODING=8BIT:organization
+PHOTO;VALUE=URI:/home/azrael/vcard.png
+ROLE;CHARSET=UTF-8;ENCODING=8BIT:role
+TEL;TYPE=WORK:workphone
+TEL;TYPE=FAX;TYPE=WORK:work fax
+TEL;TYPE=HOME:homephone
+TEL;TYPE=CELL:mobilephone
+TEL;TYPE=FAX;TYPE=HOME:homefax
+TEL;TYPE=MSG:messenger
+TEL;TYPE=FAX;TYPE=PREF:fax
+TEL;TYPE=VIDEO:vidoe
+TEL;TYPE=MODEM:modem
+TEL;TYPE=ISDN:isdn
+TEL;TYPE=PAGER:pager
+TEL;TYPE=BBS:mailbox
+TEL;TYPE=CAR:car
+TEL;TYPE=PCS:pcs
+UID:aZAQgtBIOB
+URL:homepage
+VERSION:2.1
+X-KADDRESSBOOK-CRYPTOENCRYPTPREF;CHARSET=UTF-8;ENCODING=8BIT:alwaysIfPossib
+ le
+X-KADDRESSBOOK-CRYPTOPROTOPREF;CHARSET=UTF-8;ENCODING=8BIT:inline openpgp,o
+ penpgp/mime,s/mime,s/mime opaque
+X-KADDRESSBOOK-CRYPTOSIGNPREF;CHARSET=UTF-8;ENCODING=8BIT:never
+X-KADDRESSBOOK-OPENPGPFP;CHARSET=UTF-8;ENCODING=8BIT:C754DDC1ECF537C4805710
+ FDABDCFBBFD93D51A9
+X-KADDRESSBOOK-X-Anniversary;CHARSET=UTF-8;ENCODING=8BIT:2005-02-10
+X-KADDRESSBOOK-X-AssistantsName;CHARSET=UTF-8;ENCODING=8BIT:assistant
+X-KADDRESSBOOK-X-Department;CHARSET=UTF-8;ENCODING=8BIT:department
+X-KADDRESSBOOK-X-IMAddress;CHARSET=UTF-8;ENCODING=8BIT:im address
+X-KADDRESSBOOK-X-ManagersName;CHARSET=UTF-8;ENCODING=8BIT:manager
+X-KADDRESSBOOK-X-Office;CHARSET=UTF-8;ENCODING=8BIT:office
+X-KADDRESSBOOK-X-Profession;CHARSET=UTF-8;ENCODING=8BIT:profession
+X-KADDRESSBOOK-X-SpousesName;CHARSET=UTF-8;ENCODING=8BIT:spouse
+X-messaging/aim-All;CHARSET=UTF-8;ENCODING=8BIT:aim
+X-messaging/gadu-All;CHARSET=UTF-8;ENCODING=8BIT:gadugadu
+X-messaging/icq-All;CHARSET=UTF-8;ENCODING=8BIT:icq
+X-messaging/irc-All;CHARSET=UTF-8;ENCODING=8BIT:irc
+X-messaging/msn-All;CHARSET=UTF-8;ENCODING=8BIT:msn
+X-messaging/sms-All;CHARSET=UTF-8;ENCODING=8BIT:im sms
+X-messaging/xmpp-All;CHARSET=UTF-8;ENCODING=8BIT:jabber
+X-messaging/yahoo-All;CHARSET=UTF-8;ENCODING=8BIT:yahoo
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-photo2-3.0.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-photo2-3.0.vcf
new file mode 100644
index 00000000..ee5de13d
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-photo2-3.0.vcf
@@ -0,0 +1,77 @@
+BEGIN:VCARD
+ADR;TYPE=work:pobox2;;Street1 work;locale2;region2;postalcode2;Germany
+ADR;TYPE=home;TYPE=pref:pobox1;;HomeAddress1;local1;region1;postalcode1;Ger
+ many
+BDAY:2005-02-26T00:00:00Z
+CATEGORIES:Customer,Family
+CLASS:PRIVATE
+EMAIL;TYPE=PREF:email1
+EMAIL:email2@test.com
+FN:givenname familynames
+GEO:52.500000;13.366667
+KEY;ENCODING=b;TYPE=PGP:mQGiBECXtzARBAC99Ll8ePW6FCzq8KUBwEYzo+J/u4EmkgCxgWm
+ Vzsvj2Uu7/OhwFaGJcv+fBSF+XtGhZeUk+Pcl4x0tMY5H07/k6ObF8+0O164J+Jg5bMlk2I6X1n
+ UhmAA4aIZCALHwcNZCq9b7HMKr3Sh1eMas2MQ2hL7mTrkfrcxqSNmTA1l/BwCgo+yOOozD6kohz
+ nRr+8jiYimho30EAJDN9YKkTh3kM1jrc9Q11N7zEnQUXtPC4GqQmW7BXgEmSBErEduk3N9NqnzG
+ xFruQrpXWisExv4z/t67uBou++m64J/Ad+T6wC19h72U15UVch/4bU7YqACjdlocUBfmnV3njko
+ Dhl6wmg7fxdCOJfkCXw+VKD9iiqXiSlqFh3IjA/4hdl3npIPKa0EeDnHDSUIbtZAd74i3Lzz1fJ
+ h5vip5N3alqSynJPmzPCWE7dMzOB/iPb+G50X046QT2OEypN9L5Trd5KJonlg+crN/aUZSjCmCC
+ foaBiISdox753MkVOipWH15F27KOqPHBNLrCnrYVCLMNpN/4aSbrn7AXzjbELQlQXJtaW4gQmF1
+ ZXIgPGFybWluLmJhdWVyQGRlc3Njb24uY29tPoheBBMRAgAeBQJAl7cwAhsDBgsJCAcDAgMVAgM
+ DFgIBAh4BAheAAAoJEKvc+7/ZPVGpDNQAmwaN2121JO3i3AcRT5ns8KeQU2x2AJ9w5i2jQ5gZ4m
+ 3jVJPFohsL03i2hbQgQXJtaW4gQmF1ZXIgPGF6cmFlbEBkZXNzY29uLmNvbT6IXgQTEQIAHgUCQ
+ Je5JQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRCr3Pu/2T1RqfVrAJ9ANz3hB4TqVahybg8i
+ XJUfmOtjbACfSLJBPGBI84P/RIEe7FKCDC05ZT65AQ0EQJe3MBAEALFujyLPriDAyh0+u8KXoBf
+ SSrnyrDnjvhG0gGsyqSfE06JvKDK6q0ZUlRAj/1cbHS+Rb8t6mUN8HquVjPkWG6eNhcGNnRxjc+
+ 7OqCiVhN7rt4c2HibVQWLy/8y04/Uqj2F9TwaiiuixIJiVA0tdqdgPxFFSCS6aRJhJ6EBw+rbXA
+ AMFBACtsn+fb3aQlaFiBurznAHmv/j2X3k2WXtaubPkNKEWf7HyLos0F5vSw0/hh0/YBabdpaK8
+ LNNuP3Q0ABPjUzyK7cH5fxHPb8BWKIKvB5aXAPr4fMFnRmvpzKmmV1yxegHQvmnpZEloODtWa1J
+ /qNq8OlFhks4tVFyxj7uKmRF1yIhJBBgRAgAJBQJAl7cwAhsMAAoJEKvc+7/ZPVGpqaoAn0yTGk
+ 6w/agEpgjKrsDAACV3l8mpAJ9X3AzwPCKMIx+NpIetkoKFroWxrQ==
+LOGO;VALUE=URI:/home/azrael/vcard.png
+N:familynames;givenname;additional names;prefix;suffix
+NICKNAME:nickname
+NOTE:This is a note!
+ORG:organization
+PHOTO;VALUE=URI:/home/azrael/vcard.png
+ROLE:role
+TEL;TYPE=WORK:workphone
+TEL;TYPE=FAX;TYPE=WORK:work fax
+TEL;TYPE=HOME:homephone
+TEL;TYPE=CELL:mobilephone
+TEL;TYPE=FAX;TYPE=HOME:homefax
+TEL;TYPE=MSG:messenger
+TEL;TYPE=FAX;TYPE=PREF:fax
+TEL;TYPE=VIDEO:vidoe
+TEL;TYPE=MODEM:modem
+TEL;TYPE=ISDN:isdn
+TEL;TYPE=PAGER:pager
+TEL;TYPE=BBS:mailbox
+TEL;TYPE=CAR:car
+TEL;TYPE=PCS:pcs
+UID:aZAQgtBIOB
+URL:homepage
+VERSION:3.0
+X-KADDRESSBOOK-CRYPTOENCRYPTPREF:alwaysIfPossible
+X-KADDRESSBOOK-CRYPTOPROTOPREF:inline openpgp,openpgp/mime,s/mime,s/mime op
+ aque
+X-KADDRESSBOOK-CRYPTOSIGNPREF:never
+X-KADDRESSBOOK-OPENPGPFP:C754DDC1ECF537C4805710FDABDCFBBFD93D51A9
+X-KADDRESSBOOK-X-Anniversary:2005-02-10
+X-KADDRESSBOOK-X-AssistantsName:assistant
+X-KADDRESSBOOK-X-Department:department
+X-KADDRESSBOOK-X-IMAddress:im address
+X-KADDRESSBOOK-X-ManagersName:manager
+X-KADDRESSBOOK-X-Office:office
+X-KADDRESSBOOK-X-Profession:profession
+X-KADDRESSBOOK-X-SpousesName:spouse
+X-messaging/aim-All:aim
+X-messaging/gadu-All:gadugadu
+X-messaging/icq-All:icq
+X-messaging/irc-All:irc
+X-messaging/msn-All:msn
+X-messaging/sms-All:im sms
+X-messaging/xmpp-All:jabber
+X-messaging/yahoo-All:yahoo
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-sound1-2.1.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-sound1-2.1.vcf
new file mode 100644
index 00000000..a6388d19
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-sound1-2.1.vcf
@@ -0,0 +1,76 @@
+BEGIN:VCARD
+ADR;CHARSET=UTF-8;ENCODING=8BIT;TYPE=work:pobox2;;Street1 work;locale2;regi
+ on2;postalcode2;Germany
+ADR;CHARSET=UTF-8;ENCODING=8BIT;TYPE=home;TYPE=pref:pobox1;;HomeAddress1;lo
+ cal1;region1;postalcode1;Germany
+BDAY:2005-02-26T00:00:00Z
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT;TYPE=PREF:email1
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT:email2@test.com
+FN;CHARSET=UTF-8;ENCODING=8BIT:givenname familynames
+GEO:52.500000;13.366667
+KEY;ENCODING=b;TYPE=PGP:mQGiBECXtzARBAC99Ll8ePW6FCzq8KUBwEYzo+J/u4EmkgCxgWm
+ Vzsvj2Uu7/OhwFaGJcv+fBSF+XtGhZeUk+Pcl4x0tMY5H07/k6ObF8+0O164J+Jg5bMlk2I6X1n
+ UhmAA4aIZCALHwcNZCq9b7HMKr3Sh1eMas2MQ2hL7mTrkfrcxqSNmTA1l/BwCgo+yOOozD6kohz
+ nRr+8jiYimho30EAJDN9YKkTh3kM1jrc9Q11N7zEnQUXtPC4GqQmW7BXgEmSBErEduk3N9NqnzG
+ xFruQrpXWisExv4z/t67uBou++m64J/Ad+T6wC19h72U15UVch/4bU7YqACjdlocUBfmnV3njko
+ Dhl6wmg7fxdCOJfkCXw+VKD9iiqXiSlqFh3IjA/4hdl3npIPKa0EeDnHDSUIbtZAd74i3Lzz1fJ
+ h5vip5N3alqSynJPmzPCWE7dMzOB/iPb+G50X046QT2OEypN9L5Trd5KJonlg+crN/aUZSjCmCC
+ foaBiISdox753MkVOipWH15F27KOqPHBNLrCnrYVCLMNpN/4aSbrn7AXzjbELQlQXJtaW4gQmF1
+ ZXIgPGFybWluLmJhdWVyQGRlc3Njb24uY29tPoheBBMRAgAeBQJAl7cwAhsDBgsJCAcDAgMVAgM
+ DFgIBAh4BAheAAAoJEKvc+7/ZPVGpDNQAmwaN2121JO3i3AcRT5ns8KeQU2x2AJ9w5i2jQ5gZ4m
+ 3jVJPFohsL03i2hbQgQXJtaW4gQmF1ZXIgPGF6cmFlbEBkZXNzY29uLmNvbT6IXgQTEQIAHgUCQ
+ Je5JQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRCr3Pu/2T1RqfVrAJ9ANz3hB4TqVahybg8i
+ XJUfmOtjbACfSLJBPGBI84P/RIEe7FKCDC05ZT65AQ0EQJe3MBAEALFujyLPriDAyh0+u8KXoBf
+ SSrnyrDnjvhG0gGsyqSfE06JvKDK6q0ZUlRAj/1cbHS+Rb8t6mUN8HquVjPkWG6eNhcGNnRxjc+
+ 7OqCiVhN7rt4c2HibVQWLy/8y04/Uqj2F9TwaiiuixIJiVA0tdqdgPxFFSCS6aRJhJ6EBw+rbXA
+ AMFBACtsn+fb3aQlaFiBurznAHmv/j2X3k2WXtaubPkNKEWf7HyLos0F5vSw0/hh0/YBabdpaK8
+ LNNuP3Q0ABPjUzyK7cH5fxHPb8BWKIKvB5aXAPr4fMFnRmvpzKmmV1yxegHQvmnpZEloODtWa1J
+ /qNq8OlFhks4tVFyxj7uKmRF1yIhJBBgRAgAJBQJAl7cwAhsMAAoJEKvc+7/ZPVGpqaoAn0yTGk
+ 6w/agEpgjKrsDAACV3l8mpAJ9X3AzwPCKMIx+NpIetkoKFroWxrQ==
+N;CHARSET=UTF-8;ENCODING=8BIT:familynames;givenname;additional names;prefix
+ ;suffix
+NOTE;CHARSET=UTF-8;ENCODING=8BIT:This is a note!
+ORG;CHARSET=UTF-8;ENCODING=8BIT:organization
+ROLE;CHARSET=UTF-8;ENCODING=8BIT:role
+TEL;TYPE=WORK:workphone
+TEL;TYPE=FAX;TYPE=WORK:work fax
+TEL;TYPE=HOME:homephone
+TEL;TYPE=CELL:mobilephone
+TEL;TYPE=FAX;TYPE=HOME:homefax
+TEL;TYPE=MSG:messenger
+TEL;TYPE=FAX;TYPE=PREF:fax
+TEL;TYPE=VIDEO:vidoe
+TEL;TYPE=MODEM:modem
+TEL;TYPE=ISDN:isdn
+TEL;TYPE=PAGER:pager
+TEL;TYPE=BBS:mailbox
+TEL;TYPE=CAR:car
+TEL;TYPE=PCS:pcs
+UID:aZAQgtBIOB
+URL:homepage
+VERSION:2.1
+X-KADDRESSBOOK-CRYPTOENCRYPTPREF;CHARSET=UTF-8;ENCODING=8BIT:alwaysIfPossib
+ le
+X-KADDRESSBOOK-CRYPTOPROTOPREF;CHARSET=UTF-8;ENCODING=8BIT:inline openpgp,o
+ penpgp/mime,s/mime,s/mime opaque
+X-KADDRESSBOOK-CRYPTOSIGNPREF;CHARSET=UTF-8;ENCODING=8BIT:never
+X-KADDRESSBOOK-OPENPGPFP;CHARSET=UTF-8;ENCODING=8BIT:C754DDC1ECF537C4805710
+ FDABDCFBBFD93D51A9
+X-KADDRESSBOOK-X-Anniversary;CHARSET=UTF-8;ENCODING=8BIT:2005-02-10
+X-KADDRESSBOOK-X-AssistantsName;CHARSET=UTF-8;ENCODING=8BIT:assistant
+X-KADDRESSBOOK-X-Department;CHARSET=UTF-8;ENCODING=8BIT:department
+X-KADDRESSBOOK-X-IMAddress;CHARSET=UTF-8;ENCODING=8BIT:im address
+X-KADDRESSBOOK-X-ManagersName;CHARSET=UTF-8;ENCODING=8BIT:manager
+X-KADDRESSBOOK-X-Office;CHARSET=UTF-8;ENCODING=8BIT:office
+X-KADDRESSBOOK-X-Profession;CHARSET=UTF-8;ENCODING=8BIT:profession
+X-KADDRESSBOOK-X-SpousesName;CHARSET=UTF-8;ENCODING=8BIT:spouse
+X-messaging/aim-All;CHARSET=UTF-8;ENCODING=8BIT:aim
+X-messaging/gadu-All;CHARSET=UTF-8;ENCODING=8BIT:gadugadu
+X-messaging/icq-All;CHARSET=UTF-8;ENCODING=8BIT:icq
+X-messaging/irc-All;CHARSET=UTF-8;ENCODING=8BIT:irc
+X-messaging/msn-All;CHARSET=UTF-8;ENCODING=8BIT:msn
+X-messaging/sms-All;CHARSET=UTF-8;ENCODING=8BIT:im sms
+X-messaging/xmpp-All;CHARSET=UTF-8;ENCODING=8BIT:jabber
+X-messaging/yahoo-All;CHARSET=UTF-8;ENCODING=8BIT:yahoo
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-sound1-3.0.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-sound1-3.0.vcf
new file mode 100644
index 00000000..7975ce6a
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-sound1-3.0.vcf
@@ -0,0 +1,75 @@
+BEGIN:VCARD
+ADR;TYPE=work:pobox2;;Street1 work;locale2;region2;postalcode2;Germany
+ADR;TYPE=home;TYPE=pref:pobox1;;HomeAddress1;local1;region1;postalcode1;Ger
+ many
+BDAY:2005-02-26T00:00:00Z
+CATEGORIES:Customer,Family
+CLASS:PRIVATE
+EMAIL;TYPE=PREF:email1
+EMAIL:email2@test.com
+FN:givenname familynames
+GEO:52.500000;13.366667
+KEY;ENCODING=b;TYPE=PGP:mQGiBECXtzARBAC99Ll8ePW6FCzq8KUBwEYzo+J/u4EmkgCxgWm
+ Vzsvj2Uu7/OhwFaGJcv+fBSF+XtGhZeUk+Pcl4x0tMY5H07/k6ObF8+0O164J+Jg5bMlk2I6X1n
+ UhmAA4aIZCALHwcNZCq9b7HMKr3Sh1eMas2MQ2hL7mTrkfrcxqSNmTA1l/BwCgo+yOOozD6kohz
+ nRr+8jiYimho30EAJDN9YKkTh3kM1jrc9Q11N7zEnQUXtPC4GqQmW7BXgEmSBErEduk3N9NqnzG
+ xFruQrpXWisExv4z/t67uBou++m64J/Ad+T6wC19h72U15UVch/4bU7YqACjdlocUBfmnV3njko
+ Dhl6wmg7fxdCOJfkCXw+VKD9iiqXiSlqFh3IjA/4hdl3npIPKa0EeDnHDSUIbtZAd74i3Lzz1fJ
+ h5vip5N3alqSynJPmzPCWE7dMzOB/iPb+G50X046QT2OEypN9L5Trd5KJonlg+crN/aUZSjCmCC
+ foaBiISdox753MkVOipWH15F27KOqPHBNLrCnrYVCLMNpN/4aSbrn7AXzjbELQlQXJtaW4gQmF1
+ ZXIgPGFybWluLmJhdWVyQGRlc3Njb24uY29tPoheBBMRAgAeBQJAl7cwAhsDBgsJCAcDAgMVAgM
+ DFgIBAh4BAheAAAoJEKvc+7/ZPVGpDNQAmwaN2121JO3i3AcRT5ns8KeQU2x2AJ9w5i2jQ5gZ4m
+ 3jVJPFohsL03i2hbQgQXJtaW4gQmF1ZXIgPGF6cmFlbEBkZXNzY29uLmNvbT6IXgQTEQIAHgUCQ
+ Je5JQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRCr3Pu/2T1RqfVrAJ9ANz3hB4TqVahybg8i
+ XJUfmOtjbACfSLJBPGBI84P/RIEe7FKCDC05ZT65AQ0EQJe3MBAEALFujyLPriDAyh0+u8KXoBf
+ SSrnyrDnjvhG0gGsyqSfE06JvKDK6q0ZUlRAj/1cbHS+Rb8t6mUN8HquVjPkWG6eNhcGNnRxjc+
+ 7OqCiVhN7rt4c2HibVQWLy/8y04/Uqj2F9TwaiiuixIJiVA0tdqdgPxFFSCS6aRJhJ6EBw+rbXA
+ AMFBACtsn+fb3aQlaFiBurznAHmv/j2X3k2WXtaubPkNKEWf7HyLos0F5vSw0/hh0/YBabdpaK8
+ LNNuP3Q0ABPjUzyK7cH5fxHPb8BWKIKvB5aXAPr4fMFnRmvpzKmmV1yxegHQvmnpZEloODtWa1J
+ /qNq8OlFhks4tVFyxj7uKmRF1yIhJBBgRAgAJBQJAl7cwAhsMAAoJEKvc+7/ZPVGpqaoAn0yTGk
+ 6w/agEpgjKrsDAACV3l8mpAJ9X3AzwPCKMIx+NpIetkoKFroWxrQ==
+N:familynames;givenname;additional names;prefix;suffix
+NICKNAME:nickname
+NOTE:This is a note!
+ORG:organization
+ROLE:role
+TEL;TYPE=WORK:workphone
+TEL;TYPE=FAX;TYPE=WORK:work fax
+TEL;TYPE=HOME:homephone
+TEL;TYPE=CELL:mobilephone
+TEL;TYPE=FAX;TYPE=HOME:homefax
+TEL;TYPE=MSG:messenger
+TEL;TYPE=FAX;TYPE=PREF:fax
+TEL;TYPE=VIDEO:vidoe
+TEL;TYPE=MODEM:modem
+TEL;TYPE=ISDN:isdn
+TEL;TYPE=PAGER:pager
+TEL;TYPE=BBS:mailbox
+TEL;TYPE=CAR:car
+TEL;TYPE=PCS:pcs
+UID:aZAQgtBIOB
+URL:homepage
+VERSION:3.0
+X-KADDRESSBOOK-CRYPTOENCRYPTPREF:alwaysIfPossible
+X-KADDRESSBOOK-CRYPTOPROTOPREF:inline openpgp,openpgp/mime,s/mime,s/mime op
+ aque
+X-KADDRESSBOOK-CRYPTOSIGNPREF:never
+X-KADDRESSBOOK-OPENPGPFP:C754DDC1ECF537C4805710FDABDCFBBFD93D51A9
+X-KADDRESSBOOK-X-Anniversary:2005-02-10
+X-KADDRESSBOOK-X-AssistantsName:assistant
+X-KADDRESSBOOK-X-Department:department
+X-KADDRESSBOOK-X-IMAddress:im address
+X-KADDRESSBOOK-X-ManagersName:manager
+X-KADDRESSBOOK-X-Office:office
+X-KADDRESSBOOK-X-Profession:profession
+X-KADDRESSBOOK-X-SpousesName:spouse
+X-messaging/aim-All:aim
+X-messaging/gadu-All:gadugadu
+X-messaging/icq-All:icq
+X-messaging/irc-All:irc
+X-messaging/msn-All:msn
+X-messaging/sms-All:im sms
+X-messaging/xmpp-All:jabber
+X-messaging/yahoo-All:yahoo
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-sound2-2.1.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-sound2-2.1.vcf
new file mode 100644
index 00000000..f9e5ad7c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-sound2-2.1.vcf
@@ -0,0 +1,77 @@
+BEGIN:VCARD
+ADR;CHARSET=UTF-8;ENCODING=8BIT;TYPE=work:pobox2;;Street1 work;locale2;regi
+ on2;postalcode2;Germany
+ADR;CHARSET=UTF-8;ENCODING=8BIT;TYPE=home;TYPE=pref:pobox1;;HomeAddress1;lo
+ cal1;region1;postalcode1;Germany
+BDAY:2005-02-26T00:00:00Z
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT;TYPE=PREF:email1
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT:email2@test.com
+FN;CHARSET=UTF-8;ENCODING=8BIT:givenname familynames
+GEO:52.500000;13.366667
+KEY;ENCODING=b;TYPE=PGP:mQGiBECXtzARBAC99Ll8ePW6FCzq8KUBwEYzo+J/u4EmkgCxgWm
+ Vzsvj2Uu7/OhwFaGJcv+fBSF+XtGhZeUk+Pcl4x0tMY5H07/k6ObF8+0O164J+Jg5bMlk2I6X1n
+ UhmAA4aIZCALHwcNZCq9b7HMKr3Sh1eMas2MQ2hL7mTrkfrcxqSNmTA1l/BwCgo+yOOozD6kohz
+ nRr+8jiYimho30EAJDN9YKkTh3kM1jrc9Q11N7zEnQUXtPC4GqQmW7BXgEmSBErEduk3N9NqnzG
+ xFruQrpXWisExv4z/t67uBou++m64J/Ad+T6wC19h72U15UVch/4bU7YqACjdlocUBfmnV3njko
+ Dhl6wmg7fxdCOJfkCXw+VKD9iiqXiSlqFh3IjA/4hdl3npIPKa0EeDnHDSUIbtZAd74i3Lzz1fJ
+ h5vip5N3alqSynJPmzPCWE7dMzOB/iPb+G50X046QT2OEypN9L5Trd5KJonlg+crN/aUZSjCmCC
+ foaBiISdox753MkVOipWH15F27KOqPHBNLrCnrYVCLMNpN/4aSbrn7AXzjbELQlQXJtaW4gQmF1
+ ZXIgPGFybWluLmJhdWVyQGRlc3Njb24uY29tPoheBBMRAgAeBQJAl7cwAhsDBgsJCAcDAgMVAgM
+ DFgIBAh4BAheAAAoJEKvc+7/ZPVGpDNQAmwaN2121JO3i3AcRT5ns8KeQU2x2AJ9w5i2jQ5gZ4m
+ 3jVJPFohsL03i2hbQgQXJtaW4gQmF1ZXIgPGF6cmFlbEBkZXNzY29uLmNvbT6IXgQTEQIAHgUCQ
+ Je5JQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRCr3Pu/2T1RqfVrAJ9ANz3hB4TqVahybg8i
+ XJUfmOtjbACfSLJBPGBI84P/RIEe7FKCDC05ZT65AQ0EQJe3MBAEALFujyLPriDAyh0+u8KXoBf
+ SSrnyrDnjvhG0gGsyqSfE06JvKDK6q0ZUlRAj/1cbHS+Rb8t6mUN8HquVjPkWG6eNhcGNnRxjc+
+ 7OqCiVhN7rt4c2HibVQWLy/8y04/Uqj2F9TwaiiuixIJiVA0tdqdgPxFFSCS6aRJhJ6EBw+rbXA
+ AMFBACtsn+fb3aQlaFiBurznAHmv/j2X3k2WXtaubPkNKEWf7HyLos0F5vSw0/hh0/YBabdpaK8
+ LNNuP3Q0ABPjUzyK7cH5fxHPb8BWKIKvB5aXAPr4fMFnRmvpzKmmV1yxegHQvmnpZEloODtWa1J
+ /qNq8OlFhks4tVFyxj7uKmRF1yIhJBBgRAgAJBQJAl7cwAhsMAAoJEKvc+7/ZPVGpqaoAn0yTGk
+ 6w/agEpgjKrsDAACV3l8mpAJ9X3AzwPCKMIx+NpIetkoKFroWxrQ==
+N;CHARSET=UTF-8;ENCODING=8BIT:familynames;givenname;additional names;prefix
+ ;suffix
+NOTE;CHARSET=UTF-8;ENCODING=8BIT:This is a note!
+ORG;CHARSET=UTF-8;ENCODING=8BIT:organization
+ROLE;CHARSET=UTF-8;ENCODING=8BIT:role
+SOUND;VALUE=URI:/usr/share/sounds/KDE_Event_5.ogg
+TEL;TYPE=WORK:workphone
+TEL;TYPE=FAX;TYPE=WORK:work fax
+TEL;TYPE=HOME:homephone
+TEL;TYPE=CELL:mobilephone
+TEL;TYPE=FAX;TYPE=HOME:homefax
+TEL;TYPE=MSG:messenger
+TEL;TYPE=FAX;TYPE=PREF:fax
+TEL;TYPE=VIDEO:vidoe
+TEL;TYPE=MODEM:modem
+TEL;TYPE=ISDN:isdn
+TEL;TYPE=PAGER:pager
+TEL;TYPE=BBS:mailbox
+TEL;TYPE=CAR:car
+TEL;TYPE=PCS:pcs
+UID:aZAQgtBIOB
+URL:homepage
+VERSION:2.1
+X-KADDRESSBOOK-CRYPTOENCRYPTPREF;CHARSET=UTF-8;ENCODING=8BIT:alwaysIfPossib
+ le
+X-KADDRESSBOOK-CRYPTOPROTOPREF;CHARSET=UTF-8;ENCODING=8BIT:inline openpgp,o
+ penpgp/mime,s/mime,s/mime opaque
+X-KADDRESSBOOK-CRYPTOSIGNPREF;CHARSET=UTF-8;ENCODING=8BIT:never
+X-KADDRESSBOOK-OPENPGPFP;CHARSET=UTF-8;ENCODING=8BIT:C754DDC1ECF537C4805710
+ FDABDCFBBFD93D51A9
+X-KADDRESSBOOK-X-Anniversary;CHARSET=UTF-8;ENCODING=8BIT:2005-02-10
+X-KADDRESSBOOK-X-AssistantsName;CHARSET=UTF-8;ENCODING=8BIT:assistant
+X-KADDRESSBOOK-X-Department;CHARSET=UTF-8;ENCODING=8BIT:department
+X-KADDRESSBOOK-X-IMAddress;CHARSET=UTF-8;ENCODING=8BIT:im address
+X-KADDRESSBOOK-X-ManagersName;CHARSET=UTF-8;ENCODING=8BIT:manager
+X-KADDRESSBOOK-X-Office;CHARSET=UTF-8;ENCODING=8BIT:office
+X-KADDRESSBOOK-X-Profession;CHARSET=UTF-8;ENCODING=8BIT:profession
+X-KADDRESSBOOK-X-SpousesName;CHARSET=UTF-8;ENCODING=8BIT:spouse
+X-messaging/aim-All;CHARSET=UTF-8;ENCODING=8BIT:aim
+X-messaging/gadu-All;CHARSET=UTF-8;ENCODING=8BIT:gadugadu
+X-messaging/icq-All;CHARSET=UTF-8;ENCODING=8BIT:icq
+X-messaging/irc-All;CHARSET=UTF-8;ENCODING=8BIT:irc
+X-messaging/msn-All;CHARSET=UTF-8;ENCODING=8BIT:msn
+X-messaging/sms-All;CHARSET=UTF-8;ENCODING=8BIT:im sms
+X-messaging/xmpp-All;CHARSET=UTF-8;ENCODING=8BIT:jabber
+X-messaging/yahoo-All;CHARSET=UTF-8;ENCODING=8BIT:yahoo
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-sound2-3.0.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-sound2-3.0.vcf
new file mode 100644
index 00000000..cea91d7b
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-sound2-3.0.vcf
@@ -0,0 +1,76 @@
+BEGIN:VCARD
+ADR;TYPE=work:pobox2;;Street1 work;locale2;region2;postalcode2;Germany
+ADR;TYPE=home;TYPE=pref:pobox1;;HomeAddress1;local1;region1;postalcode1;Ger
+ many
+BDAY:2005-02-26T00:00:00Z
+CATEGORIES:Customer,Family
+CLASS:PRIVATE
+EMAIL;TYPE=PREF:email1
+EMAIL:email2@test.com
+FN:givenname familynames
+GEO:52.500000;13.366667
+KEY;ENCODING=b;TYPE=PGP:mQGiBECXtzARBAC99Ll8ePW6FCzq8KUBwEYzo+J/u4EmkgCxgWm
+ Vzsvj2Uu7/OhwFaGJcv+fBSF+XtGhZeUk+Pcl4x0tMY5H07/k6ObF8+0O164J+Jg5bMlk2I6X1n
+ UhmAA4aIZCALHwcNZCq9b7HMKr3Sh1eMas2MQ2hL7mTrkfrcxqSNmTA1l/BwCgo+yOOozD6kohz
+ nRr+8jiYimho30EAJDN9YKkTh3kM1jrc9Q11N7zEnQUXtPC4GqQmW7BXgEmSBErEduk3N9NqnzG
+ xFruQrpXWisExv4z/t67uBou++m64J/Ad+T6wC19h72U15UVch/4bU7YqACjdlocUBfmnV3njko
+ Dhl6wmg7fxdCOJfkCXw+VKD9iiqXiSlqFh3IjA/4hdl3npIPKa0EeDnHDSUIbtZAd74i3Lzz1fJ
+ h5vip5N3alqSynJPmzPCWE7dMzOB/iPb+G50X046QT2OEypN9L5Trd5KJonlg+crN/aUZSjCmCC
+ foaBiISdox753MkVOipWH15F27KOqPHBNLrCnrYVCLMNpN/4aSbrn7AXzjbELQlQXJtaW4gQmF1
+ ZXIgPGFybWluLmJhdWVyQGRlc3Njb24uY29tPoheBBMRAgAeBQJAl7cwAhsDBgsJCAcDAgMVAgM
+ DFgIBAh4BAheAAAoJEKvc+7/ZPVGpDNQAmwaN2121JO3i3AcRT5ns8KeQU2x2AJ9w5i2jQ5gZ4m
+ 3jVJPFohsL03i2hbQgQXJtaW4gQmF1ZXIgPGF6cmFlbEBkZXNzY29uLmNvbT6IXgQTEQIAHgUCQ
+ Je5JQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRCr3Pu/2T1RqfVrAJ9ANz3hB4TqVahybg8i
+ XJUfmOtjbACfSLJBPGBI84P/RIEe7FKCDC05ZT65AQ0EQJe3MBAEALFujyLPriDAyh0+u8KXoBf
+ SSrnyrDnjvhG0gGsyqSfE06JvKDK6q0ZUlRAj/1cbHS+Rb8t6mUN8HquVjPkWG6eNhcGNnRxjc+
+ 7OqCiVhN7rt4c2HibVQWLy/8y04/Uqj2F9TwaiiuixIJiVA0tdqdgPxFFSCS6aRJhJ6EBw+rbXA
+ AMFBACtsn+fb3aQlaFiBurznAHmv/j2X3k2WXtaubPkNKEWf7HyLos0F5vSw0/hh0/YBabdpaK8
+ LNNuP3Q0ABPjUzyK7cH5fxHPb8BWKIKvB5aXAPr4fMFnRmvpzKmmV1yxegHQvmnpZEloODtWa1J
+ /qNq8OlFhks4tVFyxj7uKmRF1yIhJBBgRAgAJBQJAl7cwAhsMAAoJEKvc+7/ZPVGpqaoAn0yTGk
+ 6w/agEpgjKrsDAACV3l8mpAJ9X3AzwPCKMIx+NpIetkoKFroWxrQ==
+N:familynames;givenname;additional names;prefix;suffix
+NICKNAME:nickname
+NOTE:This is a note!
+ORG:organization
+ROLE:role
+SOUND;VALUE=URI:/usr/share/sounds/KDE_Event_5.ogg
+TEL;TYPE=WORK:workphone
+TEL;TYPE=FAX;TYPE=WORK:work fax
+TEL;TYPE=HOME:homephone
+TEL;TYPE=CELL:mobilephone
+TEL;TYPE=FAX;TYPE=HOME:homefax
+TEL;TYPE=MSG:messenger
+TEL;TYPE=FAX;TYPE=PREF:fax
+TEL;TYPE=VIDEO:vidoe
+TEL;TYPE=MODEM:modem
+TEL;TYPE=ISDN:isdn
+TEL;TYPE=PAGER:pager
+TEL;TYPE=BBS:mailbox
+TEL;TYPE=CAR:car
+TEL;TYPE=PCS:pcs
+UID:aZAQgtBIOB
+URL:homepage
+VERSION:3.0
+X-KADDRESSBOOK-CRYPTOENCRYPTPREF:alwaysIfPossible
+X-KADDRESSBOOK-CRYPTOPROTOPREF:inline openpgp,openpgp/mime,s/mime,s/mime op
+ aque
+X-KADDRESSBOOK-CRYPTOSIGNPREF:never
+X-KADDRESSBOOK-OPENPGPFP:C754DDC1ECF537C4805710FDABDCFBBFD93D51A9
+X-KADDRESSBOOK-X-Anniversary:2005-02-10
+X-KADDRESSBOOK-X-AssistantsName:assistant
+X-KADDRESSBOOK-X-Department:department
+X-KADDRESSBOOK-X-IMAddress:im address
+X-KADDRESSBOOK-X-ManagersName:manager
+X-KADDRESSBOOK-X-Office:office
+X-KADDRESSBOOK-X-Profession:profession
+X-KADDRESSBOOK-X-SpousesName:spouse
+X-messaging/aim-All:aim
+X-messaging/gadu-All:gadugadu
+X-messaging/icq-All:icq
+X-messaging/irc-All:irc
+X-messaging/msn-All:msn
+X-messaging/sms-All:im sms
+X-messaging/xmpp-All:jabber
+X-messaging/yahoo-All:yahoo
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-special-2.1.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-special-2.1.vcf
new file mode 100644
index 00000000..48b85843
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-special-2.1.vcf
@@ -0,0 +1,79 @@
+BEGIN:VCARD
+ADR;CHARSET=UTF-8;ENCODING=8BIT;TYPE=work:pobox2;;Street1 work;locale2;regi
+ on2;postalcode2;Germany
+ADR;CHARSET=UTF-8;ENCODING=8BIT;TYPE=home;TYPE=pref:pobox1;;HomeAddress1\nm
+ ultine;local1;region1;postalcode1;Germany
+BDAY:2005-02-26T00:00:00Z
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT;TYPE=PREF:email1
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT:email2@test.com
+FN;CHARSET=UTF-8;ENCODING=8BIT:givenname familynames
+GEO:52.500000;13.366667
+KEY;ENCODING=b;TYPE=PGP:mQGiBECXtzARBAC99Ll8ePW6FCzq8KUBwEYzo+J/u4EmkgCxgWm
+ Vzsvj2Uu7/OhwFaGJcv+fBSF+XtGhZeUk+Pcl4x0tMY5H07/k6ObF8+0O164J+Jg5bMlk2I6X1n
+ UhmAA4aIZCALHwcNZCq9b7HMKr3Sh1eMas2MQ2hL7mTrkfrcxqSNmTA1l/BwCgo+yOOozD6kohz
+ nRr+8jiYimho30EAJDN9YKkTh3kM1jrc9Q11N7zEnQUXtPC4GqQmW7BXgEmSBErEduk3N9NqnzG
+ xFruQrpXWisExv4z/t67uBou++m64J/Ad+T6wC19h72U15UVch/4bU7YqACjdlocUBfmnV3njko
+ Dhl6wmg7fxdCOJfkCXw+VKD9iiqXiSlqFh3IjA/4hdl3npIPKa0EeDnHDSUIbtZAd74i3Lzz1fJ
+ h5vip5N3alqSynJPmzPCWE7dMzOB/iPb+G50X046QT2OEypN9L5Trd5KJonlg+crN/aUZSjCmCC
+ foaBiISdox753MkVOipWH15F27KOqPHBNLrCnrYVCLMNpN/4aSbrn7AXzjbELQlQXJtaW4gQmF1
+ ZXIgPGFybWluLmJhdWVyQGRlc3Njb24uY29tPoheBBMRAgAeBQJAl7cwAhsDBgsJCAcDAgMVAgM
+ DFgIBAh4BAheAAAoJEKvc+7/ZPVGpDNQAmwaN2121JO3i3AcRT5ns8KeQU2x2AJ9w5i2jQ5gZ4m
+ 3jVJPFohsL03i2hbQgQXJtaW4gQmF1ZXIgPGF6cmFlbEBkZXNzY29uLmNvbT6IXgQTEQIAHgUCQ
+ Je5JQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRCr3Pu/2T1RqfVrAJ9ANz3hB4TqVahybg8i
+ XJUfmOtjbACfSLJBPGBI84P/RIEe7FKCDC05ZT65AQ0EQJe3MBAEALFujyLPriDAyh0+u8KXoBf
+ SSrnyrDnjvhG0gGsyqSfE06JvKDK6q0ZUlRAj/1cbHS+Rb8t6mUN8HquVjPkWG6eNhcGNnRxjc+
+ 7OqCiVhN7rt4c2HibVQWLy/8y04/Uqj2F9TwaiiuixIJiVA0tdqdgPxFFSCS6aRJhJ6EBw+rbXA
+ AMFBACtsn+fb3aQlaFiBurznAHmv/j2X3k2WXtaubPkNKEWf7HyLos0F5vSw0/hh0/YBabdpaK8
+ LNNuP3Q0ABPjUzyK7cH5fxHPb8BWKIKvB5aXAPr4fMFnRmvpzKmmV1yxegHQvmnpZEloODtWa1J
+ /qNq8OlFhks4tVFyxj7uKmRF1yIhJBBgRAgAJBQJAl7cwAhsMAAoJEKvc+7/ZPVGpqaoAn0yTGk
+ 6w/agEpgjKrsDAACV3l8mpAJ9X3AzwPCKMIx+NpIetkoKFroWxrQ==
+N;CHARSET=UTF-8;ENCODING=8BIT:familynames;givenname;additional names;prefix
+ ;suffix
+NOTE;CHARSET=UTF-8;ENCODING=8BIT:This is a multine note! öääüßöäü\n°^!"§$%&
+ /()=?`*'Ä_:;>^+#-.,<¬¹²³¼½¬{[]}\\¸~¨`^þø→↓â†Å§Â¶â‚¬Å‚@æßðđŋħjĸłË^`|«»¢“â€nµ─· <-tab
+ \nwith\nmultiple\nlines
+ORG;CHARSET=UTF-8;ENCODING=8BIT:organization
+ROLE;CHARSET=UTF-8;ENCODING=8BIT:roleäöüüüäö
+SOUND;VALUE=URI:/usr/share/sounds/KDE_Event_5.ogg
+TEL;TYPE=WORK:workphone
+TEL;TYPE=FAX;TYPE=WORK:work fax
+TEL;TYPE=HOME:homephone
+TEL;TYPE=CELL:mobilephone
+TEL;TYPE=FAX;TYPE=HOME:homefax
+TEL;TYPE=MSG:messenger
+TEL;TYPE=FAX;TYPE=PREF:fax
+TEL;TYPE=VIDEO:vidoe
+TEL;TYPE=MODEM:modem
+TEL;TYPE=ISDN:isdn
+TEL;TYPE=PAGER:pager
+TEL;TYPE=BBS:mailbox
+TEL;TYPE=CAR:car
+TEL;TYPE=PCS:pcs
+UID:aZAQgtBIOB
+URL:homepage
+VERSION:2.1
+X-KADDRESSBOOK-CRYPTOENCRYPTPREF;CHARSET=UTF-8;ENCODING=8BIT:alwaysIfPossib
+ le
+X-KADDRESSBOOK-CRYPTOPROTOPREF;CHARSET=UTF-8;ENCODING=8BIT:inline openpgp,o
+ penpgp/mime,s/mime,s/mime opaque
+X-KADDRESSBOOK-CRYPTOSIGNPREF;CHARSET=UTF-8;ENCODING=8BIT:never
+X-KADDRESSBOOK-OPENPGPFP;CHARSET=UTF-8;ENCODING=8BIT:C754DDC1ECF537C4805710
+ FDABDCFBBFD93D51A9
+X-KADDRESSBOOK-X-Anniversary;CHARSET=UTF-8;ENCODING=8BIT:2005-02-10
+X-KADDRESSBOOK-X-AssistantsName;CHARSET=UTF-8;ENCODING=8BIT:assistant
+X-KADDRESSBOOK-X-Department;CHARSET=UTF-8;ENCODING=8BIT:department
+X-KADDRESSBOOK-X-IMAddress;CHARSET=UTF-8;ENCODING=8BIT:im address
+X-KADDRESSBOOK-X-ManagersName;CHARSET=UTF-8;ENCODING=8BIT:manager
+X-KADDRESSBOOK-X-Office;CHARSET=UTF-8;ENCODING=8BIT:office
+X-KADDRESSBOOK-X-Profession;CHARSET=UTF-8;ENCODING=8BIT:profession
+X-KADDRESSBOOK-X-SpousesName;CHARSET=UTF-8;ENCODING=8BIT:spouse
+X-messaging/aim-All;CHARSET=UTF-8;ENCODING=8BIT:aim
+X-messaging/gadu-All;CHARSET=UTF-8;ENCODING=8BIT:gadugadu
+X-messaging/icq-All;CHARSET=UTF-8;ENCODING=8BIT:icq
+X-messaging/irc-All;CHARSET=UTF-8;ENCODING=8BIT:irc
+X-messaging/msn-All;CHARSET=UTF-8;ENCODING=8BIT:msn
+X-messaging/sms-All;CHARSET=UTF-8;ENCODING=8BIT:im sms
+X-messaging/xmpp-All;CHARSET=UTF-8;ENCODING=8BIT:jabber
+X-messaging/yahoo-All;CHARSET=UTF-8;ENCODING=8BIT:yahoo
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-special-3.0.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-special-3.0.vcf
new file mode 100644
index 00000000..99923db8
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-special-3.0.vcf
@@ -0,0 +1,77 @@
+BEGIN:VCARD
+ADR;TYPE=work:pobox2;;Street1 work;locale2;region2;postalcode2;Germany
+ADR;TYPE=home;TYPE=pref:pobox1;;HomeAddress1\nmultine;local1;region1;postal
+ code1;Germany
+BDAY:2005-02-26T00:00:00Z
+CATEGORIES:Customer,Family
+CLASS:PRIVATE
+EMAIL;TYPE=PREF:email1
+EMAIL:email2@test.com
+FN:givenname familynames
+GEO:52.500000;13.366667
+KEY;ENCODING=b;TYPE=PGP:mQGiBECXtzARBAC99Ll8ePW6FCzq8KUBwEYzo+J/u4EmkgCxgWm
+ Vzsvj2Uu7/OhwFaGJcv+fBSF+XtGhZeUk+Pcl4x0tMY5H07/k6ObF8+0O164J+Jg5bMlk2I6X1n
+ UhmAA4aIZCALHwcNZCq9b7HMKr3Sh1eMas2MQ2hL7mTrkfrcxqSNmTA1l/BwCgo+yOOozD6kohz
+ nRr+8jiYimho30EAJDN9YKkTh3kM1jrc9Q11N7zEnQUXtPC4GqQmW7BXgEmSBErEduk3N9NqnzG
+ xFruQrpXWisExv4z/t67uBou++m64J/Ad+T6wC19h72U15UVch/4bU7YqACjdlocUBfmnV3njko
+ Dhl6wmg7fxdCOJfkCXw+VKD9iiqXiSlqFh3IjA/4hdl3npIPKa0EeDnHDSUIbtZAd74i3Lzz1fJ
+ h5vip5N3alqSynJPmzPCWE7dMzOB/iPb+G50X046QT2OEypN9L5Trd5KJonlg+crN/aUZSjCmCC
+ foaBiISdox753MkVOipWH15F27KOqPHBNLrCnrYVCLMNpN/4aSbrn7AXzjbELQlQXJtaW4gQmF1
+ ZXIgPGFybWluLmJhdWVyQGRlc3Njb24uY29tPoheBBMRAgAeBQJAl7cwAhsDBgsJCAcDAgMVAgM
+ DFgIBAh4BAheAAAoJEKvc+7/ZPVGpDNQAmwaN2121JO3i3AcRT5ns8KeQU2x2AJ9w5i2jQ5gZ4m
+ 3jVJPFohsL03i2hbQgQXJtaW4gQmF1ZXIgPGF6cmFlbEBkZXNzY29uLmNvbT6IXgQTEQIAHgUCQ
+ Je5JQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRCr3Pu/2T1RqfVrAJ9ANz3hB4TqVahybg8i
+ XJUfmOtjbACfSLJBPGBI84P/RIEe7FKCDC05ZT65AQ0EQJe3MBAEALFujyLPriDAyh0+u8KXoBf
+ SSrnyrDnjvhG0gGsyqSfE06JvKDK6q0ZUlRAj/1cbHS+Rb8t6mUN8HquVjPkWG6eNhcGNnRxjc+
+ 7OqCiVhN7rt4c2HibVQWLy/8y04/Uqj2F9TwaiiuixIJiVA0tdqdgPxFFSCS6aRJhJ6EBw+rbXA
+ AMFBACtsn+fb3aQlaFiBurznAHmv/j2X3k2WXtaubPkNKEWf7HyLos0F5vSw0/hh0/YBabdpaK8
+ LNNuP3Q0ABPjUzyK7cH5fxHPb8BWKIKvB5aXAPr4fMFnRmvpzKmmV1yxegHQvmnpZEloODtWa1J
+ /qNq8OlFhks4tVFyxj7uKmRF1yIhJBBgRAgAJBQJAl7cwAhsMAAoJEKvc+7/ZPVGpqaoAn0yTGk
+ 6w/agEpgjKrsDAACV3l8mpAJ9X3AzwPCKMIx+NpIetkoKFroWxrQ==
+N:familynames;givenname;additional names;prefix;suffix
+NICKNAME:nickname
+NOTE:This is a multine note! öääüßöäü\n°^!"§$%&/()=?`*'Ä_:;>^+#-.,<¬¹²³¼½¬{
+ []}\\¸~¨`^þø→↓â†Å§Â¶â‚¬Å‚@æßðđŋħjĸłË^`|«»¢“â€nµ─· <-tab\nwith\nmultiple\nlines
+ORG:organization
+ROLE:roleäöüüüäö
+SOUND;VALUE=URI:/usr/share/sounds/KDE_Event_5.ogg
+TEL;TYPE=WORK:workphone
+TEL;TYPE=FAX;TYPE=WORK:work fax
+TEL;TYPE=HOME:homephone
+TEL;TYPE=CELL:mobilephone
+TEL;TYPE=FAX;TYPE=HOME:homefax
+TEL;TYPE=MSG:messenger
+TEL;TYPE=FAX;TYPE=PREF:fax
+TEL;TYPE=VIDEO:vidoe
+TEL;TYPE=MODEM:modem
+TEL;TYPE=ISDN:isdn
+TEL;TYPE=PAGER:pager
+TEL;TYPE=BBS:mailbox
+TEL;TYPE=CAR:car
+TEL;TYPE=PCS:pcs
+UID:aZAQgtBIOB
+URL:homepage
+VERSION:3.0
+X-KADDRESSBOOK-CRYPTOENCRYPTPREF:alwaysIfPossible
+X-KADDRESSBOOK-CRYPTOPROTOPREF:inline openpgp,openpgp/mime,s/mime,s/mime op
+ aque
+X-KADDRESSBOOK-CRYPTOSIGNPREF:never
+X-KADDRESSBOOK-OPENPGPFP:C754DDC1ECF537C4805710FDABDCFBBFD93D51A9
+X-KADDRESSBOOK-X-Anniversary:2005-02-10
+X-KADDRESSBOOK-X-AssistantsName:assistant
+X-KADDRESSBOOK-X-Department:department
+X-KADDRESSBOOK-X-IMAddress:im address
+X-KADDRESSBOOK-X-ManagersName:manager
+X-KADDRESSBOOK-X-Office:office
+X-KADDRESSBOOK-X-Profession:profession
+X-KADDRESSBOOK-X-SpousesName:spouse
+X-messaging/aim-All:aim
+X-messaging/gadu-All:gadugadu
+X-messaging/icq-All:icq
+X-messaging/irc-All:irc
+X-messaging/msn-All:msn
+X-messaging/sms-All:im sms
+X-messaging/xmpp-All:jabber
+X-messaging/yahoo-All:yahoo
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-umlaute-2.1.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-umlaute-2.1.vcf
new file mode 100644
index 00000000..c51554dd
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-umlaute-2.1.vcf
@@ -0,0 +1,78 @@
+BEGIN:VCARD
+ADR;CHARSET=UTF-8;ENCODING=8BIT;TYPE=work:pobox2;;Street1 work;locale2;regi
+ on2;postalcode2;Germany
+ADR;CHARSET=UTF-8;ENCODING=8BIT;TYPE=home;TYPE=pref:pobox1;;HomeAddress1\nm
+ ultine;local1;region1;postalcode1;Germany
+BDAY:2005-02-26T00:00:00Z
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT;TYPE=PREF:email1
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT:email2@test.com
+FN;CHARSET=UTF-8;ENCODING=8BIT:givenname familynames
+GEO:52.500000;13.366667
+KEY;ENCODING=b;TYPE=PGP:mQGiBECXtzARBAC99Ll8ePW6FCzq8KUBwEYzo+J/u4EmkgCxgWm
+ Vzsvj2Uu7/OhwFaGJcv+fBSF+XtGhZeUk+Pcl4x0tMY5H07/k6ObF8+0O164J+Jg5bMlk2I6X1n
+ UhmAA4aIZCALHwcNZCq9b7HMKr3Sh1eMas2MQ2hL7mTrkfrcxqSNmTA1l/BwCgo+yOOozD6kohz
+ nRr+8jiYimho30EAJDN9YKkTh3kM1jrc9Q11N7zEnQUXtPC4GqQmW7BXgEmSBErEduk3N9NqnzG
+ xFruQrpXWisExv4z/t67uBou++m64J/Ad+T6wC19h72U15UVch/4bU7YqACjdlocUBfmnV3njko
+ Dhl6wmg7fxdCOJfkCXw+VKD9iiqXiSlqFh3IjA/4hdl3npIPKa0EeDnHDSUIbtZAd74i3Lzz1fJ
+ h5vip5N3alqSynJPmzPCWE7dMzOB/iPb+G50X046QT2OEypN9L5Trd5KJonlg+crN/aUZSjCmCC
+ foaBiISdox753MkVOipWH15F27KOqPHBNLrCnrYVCLMNpN/4aSbrn7AXzjbELQlQXJtaW4gQmF1
+ ZXIgPGFybWluLmJhdWVyQGRlc3Njb24uY29tPoheBBMRAgAeBQJAl7cwAhsDBgsJCAcDAgMVAgM
+ DFgIBAh4BAheAAAoJEKvc+7/ZPVGpDNQAmwaN2121JO3i3AcRT5ns8KeQU2x2AJ9w5i2jQ5gZ4m
+ 3jVJPFohsL03i2hbQgQXJtaW4gQmF1ZXIgPGF6cmFlbEBkZXNzY29uLmNvbT6IXgQTEQIAHgUCQ
+ Je5JQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRCr3Pu/2T1RqfVrAJ9ANz3hB4TqVahybg8i
+ XJUfmOtjbACfSLJBPGBI84P/RIEe7FKCDC05ZT65AQ0EQJe3MBAEALFujyLPriDAyh0+u8KXoBf
+ SSrnyrDnjvhG0gGsyqSfE06JvKDK6q0ZUlRAj/1cbHS+Rb8t6mUN8HquVjPkWG6eNhcGNnRxjc+
+ 7OqCiVhN7rt4c2HibVQWLy/8y04/Uqj2F9TwaiiuixIJiVA0tdqdgPxFFSCS6aRJhJ6EBw+rbXA
+ AMFBACtsn+fb3aQlaFiBurznAHmv/j2X3k2WXtaubPkNKEWf7HyLos0F5vSw0/hh0/YBabdpaK8
+ LNNuP3Q0ABPjUzyK7cH5fxHPb8BWKIKvB5aXAPr4fMFnRmvpzKmmV1yxegHQvmnpZEloODtWa1J
+ /qNq8OlFhks4tVFyxj7uKmRF1yIhJBBgRAgAJBQJAl7cwAhsMAAoJEKvc+7/ZPVGpqaoAn0yTGk
+ 6w/agEpgjKrsDAACV3l8mpAJ9X3AzwPCKMIx+NpIetkoKFroWxrQ==
+N;CHARSET=UTF-8;ENCODING=8BIT:familynames;givenname;additional names;prefix
+ ;suffix
+NOTE;CHARSET=UTF-8;ENCODING=8BIT:This is a multine note! öääüßöäü\nwith\nmu
+ ltiple\nlines
+ORG;CHARSET=UTF-8;ENCODING=8BIT:organization
+ROLE;CHARSET=UTF-8;ENCODING=8BIT:roleäöüüüäö
+SOUND;VALUE=URI:/usr/share/sounds/KDE_Event_5.ogg
+TEL;TYPE=WORK:workphone
+TEL;TYPE=FAX;TYPE=WORK:work fax
+TEL;TYPE=HOME:homephone
+TEL;TYPE=CELL:mobilephone
+TEL;TYPE=FAX;TYPE=HOME:homefax
+TEL;TYPE=MSG:messenger
+TEL;TYPE=FAX;TYPE=PREF:fax
+TEL;TYPE=VIDEO:vidoe
+TEL;TYPE=MODEM:modem
+TEL;TYPE=ISDN:isdn
+TEL;TYPE=PAGER:pager
+TEL;TYPE=BBS:mailbox
+TEL;TYPE=CAR:car
+TEL;TYPE=PCS:pcs
+UID:aZAQgtBIOB
+URL:homepage
+VERSION:2.1
+X-KADDRESSBOOK-CRYPTOENCRYPTPREF;CHARSET=UTF-8;ENCODING=8BIT:alwaysIfPossib
+ le
+X-KADDRESSBOOK-CRYPTOPROTOPREF;CHARSET=UTF-8;ENCODING=8BIT:inline openpgp,o
+ penpgp/mime,s/mime,s/mime opaque
+X-KADDRESSBOOK-CRYPTOSIGNPREF;CHARSET=UTF-8;ENCODING=8BIT:never
+X-KADDRESSBOOK-OPENPGPFP;CHARSET=UTF-8;ENCODING=8BIT:C754DDC1ECF537C4805710
+ FDABDCFBBFD93D51A9
+X-KADDRESSBOOK-X-Anniversary;CHARSET=UTF-8;ENCODING=8BIT:2005-02-10
+X-KADDRESSBOOK-X-AssistantsName;CHARSET=UTF-8;ENCODING=8BIT:assistant
+X-KADDRESSBOOK-X-Department;CHARSET=UTF-8;ENCODING=8BIT:department
+X-KADDRESSBOOK-X-IMAddress;CHARSET=UTF-8;ENCODING=8BIT:im address
+X-KADDRESSBOOK-X-ManagersName;CHARSET=UTF-8;ENCODING=8BIT:manager
+X-KADDRESSBOOK-X-Office;CHARSET=UTF-8;ENCODING=8BIT:office
+X-KADDRESSBOOK-X-Profession;CHARSET=UTF-8;ENCODING=8BIT:profession
+X-KADDRESSBOOK-X-SpousesName;CHARSET=UTF-8;ENCODING=8BIT:spouse
+X-messaging/aim-All;CHARSET=UTF-8;ENCODING=8BIT:aim
+X-messaging/gadu-All;CHARSET=UTF-8;ENCODING=8BIT:gadugadu
+X-messaging/icq-All;CHARSET=UTF-8;ENCODING=8BIT:icq
+X-messaging/irc-All;CHARSET=UTF-8;ENCODING=8BIT:irc
+X-messaging/msn-All;CHARSET=UTF-8;ENCODING=8BIT:msn
+X-messaging/sms-All;CHARSET=UTF-8;ENCODING=8BIT:im sms
+X-messaging/xmpp-All;CHARSET=UTF-8;ENCODING=8BIT:jabber
+X-messaging/yahoo-All;CHARSET=UTF-8;ENCODING=8BIT:yahoo
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-umlaute-3.0.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-umlaute-3.0.vcf
new file mode 100644
index 00000000..5303c4fa
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-umlaute-3.0.vcf
@@ -0,0 +1,76 @@
+BEGIN:VCARD
+ADR;TYPE=work:pobox2;;Street1 work;locale2;region2;postalcode2;Germany
+ADR;TYPE=home;TYPE=pref:pobox1;;HomeAddress1\nmultine;local1;region1;postal
+ code1;Germany
+BDAY:2005-02-26T00:00:00Z
+CATEGORIES:Customer,Family
+CLASS:PRIVATE
+EMAIL;TYPE=PREF:email1
+EMAIL:email2@test.com
+FN:givenname familynames
+GEO:52.500000;13.366667
+KEY;ENCODING=b;TYPE=PGP:mQGiBECXtzARBAC99Ll8ePW6FCzq8KUBwEYzo+J/u4EmkgCxgWm
+ Vzsvj2Uu7/OhwFaGJcv+fBSF+XtGhZeUk+Pcl4x0tMY5H07/k6ObF8+0O164J+Jg5bMlk2I6X1n
+ UhmAA4aIZCALHwcNZCq9b7HMKr3Sh1eMas2MQ2hL7mTrkfrcxqSNmTA1l/BwCgo+yOOozD6kohz
+ nRr+8jiYimho30EAJDN9YKkTh3kM1jrc9Q11N7zEnQUXtPC4GqQmW7BXgEmSBErEduk3N9NqnzG
+ xFruQrpXWisExv4z/t67uBou++m64J/Ad+T6wC19h72U15UVch/4bU7YqACjdlocUBfmnV3njko
+ Dhl6wmg7fxdCOJfkCXw+VKD9iiqXiSlqFh3IjA/4hdl3npIPKa0EeDnHDSUIbtZAd74i3Lzz1fJ
+ h5vip5N3alqSynJPmzPCWE7dMzOB/iPb+G50X046QT2OEypN9L5Trd5KJonlg+crN/aUZSjCmCC
+ foaBiISdox753MkVOipWH15F27KOqPHBNLrCnrYVCLMNpN/4aSbrn7AXzjbELQlQXJtaW4gQmF1
+ ZXIgPGFybWluLmJhdWVyQGRlc3Njb24uY29tPoheBBMRAgAeBQJAl7cwAhsDBgsJCAcDAgMVAgM
+ DFgIBAh4BAheAAAoJEKvc+7/ZPVGpDNQAmwaN2121JO3i3AcRT5ns8KeQU2x2AJ9w5i2jQ5gZ4m
+ 3jVJPFohsL03i2hbQgQXJtaW4gQmF1ZXIgPGF6cmFlbEBkZXNzY29uLmNvbT6IXgQTEQIAHgUCQ
+ Je5JQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRCr3Pu/2T1RqfVrAJ9ANz3hB4TqVahybg8i
+ XJUfmOtjbACfSLJBPGBI84P/RIEe7FKCDC05ZT65AQ0EQJe3MBAEALFujyLPriDAyh0+u8KXoBf
+ SSrnyrDnjvhG0gGsyqSfE06JvKDK6q0ZUlRAj/1cbHS+Rb8t6mUN8HquVjPkWG6eNhcGNnRxjc+
+ 7OqCiVhN7rt4c2HibVQWLy/8y04/Uqj2F9TwaiiuixIJiVA0tdqdgPxFFSCS6aRJhJ6EBw+rbXA
+ AMFBACtsn+fb3aQlaFiBurznAHmv/j2X3k2WXtaubPkNKEWf7HyLos0F5vSw0/hh0/YBabdpaK8
+ LNNuP3Q0ABPjUzyK7cH5fxHPb8BWKIKvB5aXAPr4fMFnRmvpzKmmV1yxegHQvmnpZEloODtWa1J
+ /qNq8OlFhks4tVFyxj7uKmRF1yIhJBBgRAgAJBQJAl7cwAhsMAAoJEKvc+7/ZPVGpqaoAn0yTGk
+ 6w/agEpgjKrsDAACV3l8mpAJ9X3AzwPCKMIx+NpIetkoKFroWxrQ==
+N:familynames;givenname;additional names;prefix;suffix
+NICKNAME:nickname
+NOTE:This is a multine note! öääüßöäü\nwith\nmultiple\nlines
+ORG:organization
+ROLE:roleäöüüüäö
+SOUND;VALUE=URI:/usr/share/sounds/KDE_Event_5.ogg
+TEL;TYPE=WORK:workphone
+TEL;TYPE=FAX;TYPE=WORK:work fax
+TEL;TYPE=HOME:homephone
+TEL;TYPE=CELL:mobilephone
+TEL;TYPE=FAX;TYPE=HOME:homefax
+TEL;TYPE=MSG:messenger
+TEL;TYPE=FAX;TYPE=PREF:fax
+TEL;TYPE=VIDEO:vidoe
+TEL;TYPE=MODEM:modem
+TEL;TYPE=ISDN:isdn
+TEL;TYPE=PAGER:pager
+TEL;TYPE=BBS:mailbox
+TEL;TYPE=CAR:car
+TEL;TYPE=PCS:pcs
+UID:aZAQgtBIOB
+URL:homepage
+VERSION:3.0
+X-KADDRESSBOOK-CRYPTOENCRYPTPREF:alwaysIfPossible
+X-KADDRESSBOOK-CRYPTOPROTOPREF:inline openpgp,openpgp/mime,s/mime,s/mime op
+ aque
+X-KADDRESSBOOK-CRYPTOSIGNPREF:never
+X-KADDRESSBOOK-OPENPGPFP:C754DDC1ECF537C4805710FDABDCFBBFD93D51A9
+X-KADDRESSBOOK-X-Anniversary:2005-02-10
+X-KADDRESSBOOK-X-AssistantsName:assistant
+X-KADDRESSBOOK-X-Department:department
+X-KADDRESSBOOK-X-IMAddress:im address
+X-KADDRESSBOOK-X-ManagersName:manager
+X-KADDRESSBOOK-X-Office:office
+X-KADDRESSBOOK-X-Profession:profession
+X-KADDRESSBOOK-X-SpousesName:spouse
+X-messaging/aim-All:aim
+X-messaging/gadu-All:gadugadu
+X-messaging/icq-All:icq
+X-messaging/irc-All:irc
+X-messaging/msn-All:msn
+X-messaging/sms-All:im sms
+X-messaging/xmpp-All:jabber
+X-messaging/yahoo-All:yahoo
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/malformed.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/malformed.vcf
new file mode 100644
index 00000000..4d9c3a9b
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/malformed.vcf
@@ -0,0 +1,3 @@
+BEGIN:VCARD
+N:test user
+END:VCARD
diff --git a/debian/opensync/opensync-0.22/tests/data/vevents/crash.ics b/debian/opensync/opensync-0.22/tests/data/vevents/crash.ics
new file mode 100644
index 00000000..e98a7069
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vevents/crash.ics
@@ -0,0 +1,27 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VEVENT
+ATTENDEE;CN=é;ROLE=REQ-PARTICIPANT;RSVP=TRUE;
+ PARTSTAT=ACCEPTED:MAILTO:e@a.org
+ORGANIZER:MAILTO:e@a.org
+DTSTART:20050726T053000Z
+DTEND:20050726T053000Z
+TRANSP:OPAQUE
+SEQUENCE:0
+UID:
+
+040000008200E00074C5B7101A82E0080000000070D7AE8F808CC501000000000000000010
+ 0000008C05F5F3D72E3B4C9A3BC7FBF434B6CD
+DTSTAMP:20050719T144024Z
+DESCRIPTION: Bruxelles\, Copenhague\, Madrid\, Paris.\n\n*~*~*~*~*~*~*~*~*~*\n\nSi
+s être là \n
+SUMMARY:ec
+PRIORITY:5
+CLASS:PUBLIC
+X-MICROSOFT-CDO-REPLYTIME:20050719T153821Z
+CREATED:20050719T153821
+LAST-MODIFIED:20050719T153821
+END:VEVENT
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/1-hour-alarm.vcf b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/1-hour-alarm.vcf
new file mode 100644
index 00000000..d5df7a17
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/1-hour-alarm.vcf
@@ -0,0 +1,43 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTIMEZONE
+TZID:/softwarestudio.org/Olson_20011030_5/Europe/Berlin
+X-LIC-LOCATION:Europe/Berlin
+BEGIN:DAYLIGHT
+TZOFFSETFROM:+0100
+TZOFFSETTO:+0200
+TZNAME:CEST
+DTSTART:19700329T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
+END:DAYLIGHT
+BEGIN:STANDARD
+TZOFFSETFROM:+0200
+TZOFFSETTO:+0100
+TZNAME:CET
+DTSTART:19701025T030000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:20050329T110542Z-4349-1000-1-1@craal
+DTSTAMP:20050329T110542Z
+DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T120000
+DTEND;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T130000
+TRANSP:TRANSPARENT
+SEQUENCE:3
+SUMMARY:single 1 hour alarm
+CLASS:PUBLIC
+CREATED:20050329T110602
+LAST-MODIFIED:20050329T110602
+BEGIN:VALARM
+X-EVOLUTION-ALARM-UID:20050329T110602Z-4310-1000-1-17@craal
+DESCRIPTION:single 1 hour alarm
+ACTION:DISPLAY
+TRIGGER;VALUE=DURATION;RELATED=START:-PT15M
+END:VALARM
+END:VEVENT
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/1-hour-alarm2.vcf b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/1-hour-alarm2.vcf
new file mode 100644
index 00000000..a7c351a3
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/1-hour-alarm2.vcf
@@ -0,0 +1,64 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTIMEZONE
+TZID:/softwarestudio.org/Olson_20011030_5/Europe/Berlin
+X-LIC-LOCATION:Europe/Berlin
+BEGIN:DAYLIGHT
+TZOFFSETFROM:+0100
+TZOFFSETTO:+0200
+TZNAME:CEST
+DTSTART:19700329T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
+END:DAYLIGHT
+BEGIN:STANDARD
+TZOFFSETFROM:+0200
+TZOFFSETTO:+0100
+TZNAME:CET
+DTSTART:19701025T030000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:20050329T110617Z-4349-1000-1-2@craal
+DTSTAMP:20050329T110617Z
+DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T120000
+DTEND;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T123000
+TRANSP:TRANSPARENT
+SEQUENCE:2
+SUMMARY:single 1 hour alarm 2
+LOCATION:location
+DESCRIPTION:description
+CATEGORIES:Birthday\,Business
+CLASS:PRIVATE
+CREATED:20050329T110801
+LAST-MODIFIED:20050329T110801
+BEGIN:VALARM
+X-EVOLUTION-ALARM-UID:20050329T110648Z-4310-1000-1-21@craal
+ACTION:DISPLAY
+TRIGGER;VALUE=DURATION;RELATED=START:-PT15M
+DESCRIPTION:single 1 hour alarm 2
+END:VALARM
+BEGIN:VALARM
+X-EVOLUTION-ALARM-UID:20050329T110654Z-4310-1000-1-22@craal
+TRIGGER;VALUE=DURATION;RELATED=END:PT15H
+ACTION:AUDIO
+REPEAT:1
+DURATION:PT5M
+ATTACH:/home/azrael/play.pls
+DESCRIPTION:single 1 hour alarm 2
+END:VALARM
+BEGIN:VALARM
+X-EVOLUTION-ALARM-UID:20050329T110725Z-4310-1000-1-23@craal
+TRIGGER;VALUE=DURATION;RELATED=START:P15D
+ACTION:PROCEDURE
+REPEAT:2
+DURATION:PT4H
+ATTACH:test
+DESCRIPTION:--test
+END:VALARM
+END:VEVENT
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/1-hour.vcf b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/1-hour.vcf
new file mode 100644
index 00000000..4d9d347d
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/1-hour.vcf
@@ -0,0 +1,37 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTIMEZONE
+TZID:/softwarestudio.org/Olson_20011030_5/Europe/Berlin
+X-LIC-LOCATION:Europe/Berlin
+BEGIN:DAYLIGHT
+TZOFFSETFROM:+0100
+TZOFFSETTO:+0200
+TZNAME:CEST
+DTSTART:19700329T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
+END:DAYLIGHT
+BEGIN:STANDARD
+TZOFFSETFROM:+0200
+TZOFFSETTO:+0100
+TZNAME:CET
+DTSTART:19701025T030000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:20050329T110513Z-4310-1000-1-5@craal
+DTSTAMP:20050329T110414Z
+DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T120000
+DTEND;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T130000
+TRANSP:OPAQUE
+SEQUENCE:3
+SUMMARY:single 1 hour
+CLASS:PUBLIC
+CREATED:20050329T110513
+LAST-MODIFIED:20050329T110513
+END:VEVENT
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/all-day.vcf b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/all-day.vcf
new file mode 100644
index 00000000..54b7f3fe
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/all-day.vcf
@@ -0,0 +1,16 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VEVENT
+UID:20050329T110812Z-4349-1000-1-3@craal
+DTSTAMP:20050329T110812Z
+DTSTART;VALUE=DATE:20050101
+DTEND;VALUE=DATE:20050102
+TRANSP:TRANSPARENT
+SEQUENCE:2
+SUMMARY:all day event1
+CLASS:CONFIDENTIAL
+CREATED:20050329T110837
+END:VEVENT
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/all-day2.vcf b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/all-day2.vcf
new file mode 100644
index 00000000..15ac2181
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/all-day2.vcf
@@ -0,0 +1,23 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VEVENT
+UID:20050329T110841Z-4349-1000-1-4@craal
+DTSTAMP:20050329T110841Z
+DTSTART;VALUE=DATE:20050101
+DTEND;VALUE=DATE:20050103
+TRANSP:TRANSPARENT
+SEQUENCE:2
+SUMMARY:all day event 2
+CLASS:PUBLIC
+CREATED:20050329T110901
+LAST-MODIFIED:20050329T110901
+BEGIN:VALARM
+X-EVOLUTION-ALARM-UID:20050329T110901Z-4310-1000-1-34@craal
+DESCRIPTION:all day event 2
+ACTION:DISPLAY
+TRIGGER;VALUE=DURATION;RELATED=START:-PT15M
+END:VALARM
+END:VEVENT
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/evo2-recur-until.vcf b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/evo2-recur-until.vcf
new file mode 100644
index 00000000..b3415b8c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/evo2-recur-until.vcf
@@ -0,0 +1,48 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTIMEZONE
+TZID:/softwarestudio.org/Olson_20011030_5/Europe/Berlin
+X-LIC-LOCATION:Europe/Berlin
+BEGIN:DAYLIGHT
+TZOFFSETFROM:+0100
+TZOFFSETTO:+0200
+TZNAME:CEST
+DTSTART:19700329T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
+END:DAYLIGHT
+BEGIN:STANDARD
+TZOFFSETFROM:+0200
+TZOFFSETTO:+0100
+TZNAME:CET
+DTSTART:19701025T030000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:20050307T174013Z-32171-1000-1-31@azrael
+DTSTAMP:20050307T174013Z
+DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050307T124500
+DTEND;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050307T130000
+TRANSP:OPAQUE
+SEQUENCE:2
+SUMMARY:Summary
+LOCATION:Location
+DESCRIPTION:Description\nline2\näö\nasd
+CATEGORIES:Birthday\,Business
+CLASS:PUBLIC
+RRULE:FREQ=DAILY;UNTIL=20050309;INTERVAL=1
+EXDATE;VALUE=DATE:20050308
+CREATED:20050307T174125
+LAST-MODIFIED:20050307T174125
+BEGIN:VALARM
+X-EVOLUTION-ALARM-UID:20050307T174125Z-32152-1000-1-16@azrael
+DESCRIPTION:Summary
+ACTION:DISPLAY
+TRIGGER;VALUE=DURATION;RELATED=START:-PT15M
+END:VALARM
+END:VEVENT
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/free-busy.vcf b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/free-busy.vcf
new file mode 100644
index 00000000..ee88a38c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/free-busy.vcf
@@ -0,0 +1,55 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTIMEZONE
+TZID:/softwarestudio.org/Olson_20011030_5/Europe/Moscow
+X-LIC-LOCATION:Europe/Moscow
+BEGIN:DAYLIGHT
+TZOFFSETFROM:+0300
+TZOFFSETTO:+0400
+TZNAME:MSD
+DTSTART:19700329T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
+END:DAYLIGHT
+BEGIN:STANDARD
+TZOFFSETFROM:+0400
+TZOFFSETTO:+0300
+TZNAME:MSK
+DTSTART:19701025T030000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VTIMEZONE
+TZID:/softwarestudio.org/Olson_20011030_5/America/Los_Angeles
+X-LIC-LOCATION:America/Los_Angeles
+BEGIN:STANDARD
+TZOFFSETFROM:-0700
+TZOFFSETTO:-0800
+TZNAME:PST
+DTSTART:19701025T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
+END:STANDARD
+BEGIN:DAYLIGHT
+TZOFFSETFROM:-0800
+TZOFFSETTO:-0700
+TZNAME:PDT
+DTSTART:19700405T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=4
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:20050329T111426Z-4349-1000-1-11@craal
+DTSTAMP:20050329T111426Z
+DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Moscow:
+ 20050101T123000
+DTEND;TZID=/softwarestudio.org/Olson_20011030_5/America/Los_Angeles:
+ 20050101T130000
+TRANSP:OPAQUE
+SEQUENCE:2
+SUMMARY:free busy + different timezone
+CLASS:PUBLIC
+CREATED:20050329T111518
+LAST-MODIFIED:20050329T111518
+END:VEVENT
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/full-special.vcf b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/full-special.vcf
new file mode 100644
index 00000000..7690fab6
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/full-special.vcf
@@ -0,0 +1,41 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTIMEZONE
+TZID:/softwarestudio.org/Olson_20011030_5/Europe/Berlin
+X-LIC-LOCATION:Europe/Berlin
+BEGIN:DAYLIGHT
+TZOFFSETFROM:+0100
+TZOFFSETTO:+0200
+TZNAME:CEST
+DTSTART:19700329T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
+END:DAYLIGHT
+BEGIN:STANDARD
+TZOFFSETFROM:+0200
+TZOFFSETTO:+0100
+TZNAME:CET
+DTSTART:19701025T030000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:20050329T113101Z-4349-1000-1-18@craal
+DTSTAMP:20050329T113101Z
+DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T123000
+DTEND;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T130000
+TRANSP:OPAQUE
+SEQUENCE:2
+SUMMARY:full special
+LOCATION:öäöää#++#\\\\\\\\\\\\///
+DESCRIPTION:
+ /&/((//&%$%!$§\"&%!$§&%$!&$%R§\"/&%!(//=)()?=?{[{]}\\¸´*+*üüäö\n#
+ ä#äö##-.\,\,..-\\n--.\,|<<>^^°
+CLASS:PUBLIC
+CREATED:20050329T113204
+LAST-MODIFIED:20050329T113204
+END:VEVENT
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-every-year.vcf b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-every-year.vcf
new file mode 100644
index 00000000..bf6c9b4d
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-every-year.vcf
@@ -0,0 +1,38 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTIMEZONE
+TZID:/softwarestudio.org/Olson_20011030_5/Europe/Berlin
+X-LIC-LOCATION:Europe/Berlin
+BEGIN:DAYLIGHT
+TZOFFSETFROM:+0100
+TZOFFSETTO:+0200
+TZNAME:CEST
+DTSTART:19700329T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
+END:DAYLIGHT
+BEGIN:STANDARD
+TZOFFSETFROM:+0200
+TZOFFSETTO:+0100
+TZNAME:CET
+DTSTART:19701025T030000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:20050329T111314Z-4349-1000-1-9@craal
+DTSTAMP:20050329T111314Z
+DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T160000
+DTEND;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T163000
+TRANSP:OPAQUE
+SEQUENCE:2
+SUMMARY:rec every year
+CLASS:PUBLIC
+RRULE:FREQ=YEARLY;INTERVAL=1
+CREATED:20050329T111333
+LAST-MODIFIED:20050329T111333
+END:VEVENT
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-except.vcf b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-except.vcf
new file mode 100644
index 00000000..77837a79
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-except.vcf
@@ -0,0 +1,39 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTIMEZONE
+TZID:/softwarestudio.org/Olson_20011030_5/Europe/Berlin
+X-LIC-LOCATION:Europe/Berlin
+BEGIN:DAYLIGHT
+TZOFFSETFROM:+0100
+TZOFFSETTO:+0200
+TZNAME:CEST
+DTSTART:19700329T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
+END:DAYLIGHT
+BEGIN:STANDARD
+TZOFFSETFROM:+0200
+TZOFFSETTO:+0100
+TZNAME:CET
+DTSTART:19701025T030000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:20050329T111337Z-4349-1000-1-10@craal
+DTSTAMP:20050329T111337Z
+DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T160000
+DTEND;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T163000
+TRANSP:OPAQUE
+SEQUENCE:2
+SUMMARY:rec one week except
+CLASS:PUBLIC
+RRULE:FREQ=DAILY;COUNT=7;INTERVAL=1
+EXDATE;VALUE=DATE:20050104
+CREATED:20050329T111411
+LAST-MODIFIED:20050329T111411
+END:VEVENT
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-for.vcf b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-for.vcf
new file mode 100644
index 00000000..eb605057
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-for.vcf
@@ -0,0 +1,38 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTIMEZONE
+TZID:/softwarestudio.org/Olson_20011030_5/Europe/Berlin
+X-LIC-LOCATION:Europe/Berlin
+BEGIN:DAYLIGHT
+TZOFFSETFROM:+0100
+TZOFFSETTO:+0200
+TZNAME:CEST
+DTSTART:19700329T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
+END:DAYLIGHT
+BEGIN:STANDARD
+TZOFFSETFROM:+0200
+TZOFFSETTO:+0100
+TZNAME:CET
+DTSTART:19701025T030000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:20050329T111159Z-4349-1000-1-8@craal
+DTSTAMP:20050329T111159Z
+DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T140000
+DTEND;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T143000
+TRANSP:TRANSPARENT
+SEQUENCE:2
+SUMMARY:rec 1 week for 3 weeks
+CLASS:PUBLIC
+RRULE:FREQ=WEEKLY;COUNT=3;INTERVAL=1;BYDAY=SA
+CREATED:20050329T111306
+LAST-MODIFIED:20050329T111306
+END:VEVENT
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-forever.vcf b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-forever.vcf
new file mode 100644
index 00000000..67711685
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-forever.vcf
@@ -0,0 +1,38 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTIMEZONE
+TZID:/softwarestudio.org/Olson_20011030_5/Europe/Berlin
+X-LIC-LOCATION:Europe/Berlin
+BEGIN:DAYLIGHT
+TZOFFSETFROM:+0100
+TZOFFSETTO:+0200
+TZNAME:CEST
+DTSTART:19700329T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
+END:DAYLIGHT
+BEGIN:STANDARD
+TZOFFSETFROM:+0200
+TZOFFSETTO:+0100
+TZNAME:CET
+DTSTART:19701025T030000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:20050329T110905Z-4349-1000-1-5@craal
+DTSTAMP:20050329T110905Z
+DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T140000
+DTEND;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T143000
+TRANSP:TRANSPARENT
+SEQUENCE:2
+SUMMARY:rec once forever
+CLASS:PUBLIC
+RRULE:FREQ=DAILY;INTERVAL=1
+CREATED:20050329T110925
+LAST-MODIFIED:20050329T110925
+END:VEVENT
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-until.vcf b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-until.vcf
new file mode 100644
index 00000000..a7c8c168
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-until.vcf
@@ -0,0 +1,44 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTIMEZONE
+TZID:/softwarestudio.org/Olson_20011030_5/Europe/Berlin
+X-LIC-LOCATION:Europe/Berlin
+BEGIN:DAYLIGHT
+TZOFFSETFROM:+0100
+TZOFFSETTO:+0200
+TZNAME:CEST
+DTSTART:19700329T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
+END:DAYLIGHT
+BEGIN:STANDARD
+TZOFFSETFROM:+0200
+TZOFFSETTO:+0100
+TZNAME:CET
+DTSTART:19701025T030000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:20050329T111052Z-4349-1000-1-7@craal
+DTSTAMP:20050329T111052Z
+DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T140000
+DTEND;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T143000
+TRANSP:OPAQUE
+SEQUENCE:2
+SUMMARY:rec every 2 days until 5 days
+CLASS:PUBLIC
+RRULE:FREQ=DAILY;UNTIL=20050105;INTERVAL=2
+CREATED:20050329T111148
+LAST-MODIFIED:20050329T111148
+BEGIN:VALARM
+X-EVOLUTION-ALARM-UID:20050329T111148Z-4310-1000-1-52@craal
+DESCRIPTION:rec every 2 days until 5 days
+ACTION:DISPLAY
+TRIGGER;VALUE=DURATION;RELATED=START:-PT15M
+END:VALARM
+END:VEVENT
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vevents/kdepim/1-hour-1.0.vcs b/debian/opensync/opensync-0.22/tests/data/vevents/kdepim/1-hour-1.0.vcs
new file mode 100644
index 00000000..c8944e02
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vevents/kdepim/1-hour-1.0.vcs
@@ -0,0 +1,19 @@
+BEGIN:VCALENDAR
+PRODID:-//K Desktop Environment//NONSGML libkcal 3.2//EN
+VERSION:1.0
+BEGIN:VEVENT
+DTSTART:20050101T110000Z
+DTEND:20050101T120000Z
+DCREATED:20050329T131635Z
+UID:libkcal-774591933.717
+SEQUENCE:0
+LAST-MODIFIED:20050329T131635Z
+X-ORGANIZER:MAILTO:nobody@nowhere
+SUMMARY:single 1 hour
+CLASS:PUBLIC
+PRIORITY:3
+TRANSP:0
+END:VEVENT
+
+END:VCALENDAR
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vevents/kdepim/1-hour-2.0.ics b/debian/opensync/opensync-0.22/tests/data/vevents/kdepim/1-hour-2.0.ics
new file mode 100644
index 00000000..bd3feee7
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vevents/kdepim/1-hour-2.0.ics
@@ -0,0 +1,20 @@
+BEGIN:VCALENDAR
+PRODID:-//K Desktop Environment//NONSGML libkcal 3.2//EN
+VERSION:2.0
+BEGIN:VEVENT
+DTSTAMP:20050329T131810Z
+ORGANIZER;CN=Anonymous:MAILTO:nobody@nowhere
+CREATED:20050329T131635Z
+UID:libkcal-774591933.717
+SEQUENCE:0
+LAST-MODIFIED:20050329T131635Z
+SUMMARY:single 1 hour
+CLASS:PUBLIC
+PRIORITY:3
+DTSTART:20050101T110000Z
+DTEND:20050101T120000Z
+TRANSP:OPAQUE
+END:VEVENT
+
+END:VCALENDAR
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vevents/qp_wrap b/debian/opensync/opensync-0.22/tests/data/vevents/qp_wrap
new file mode 100644
index 00000000..2d3b6188
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vevents/qp_wrap
@@ -0,0 +1,10 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+BEGIN:VEVENT
+DTSTART:20070112T133000Z
+DTEND:20070112T143000Z
+SUMMARY:Test Quoted Printable
+DESCRIPTION;ENCODING=QUOTED-PRINTABLE:=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1
+LOCATION;ENCODING=QUOTED-PRINTABLE:XXXX=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1
+END:VEVENT
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vevents/utf8_wrap b/debian/opensync/opensync-0.22/tests/data/vevents/utf8_wrap
new file mode 100644
index 00000000..76f990ca
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vevents/utf8_wrap
@@ -0,0 +1,10 @@
+BEGIN:VCALENDAR
+VERSION:1.0
+BEGIN:VEVENT
+DTSTART:20070112T133000Z
+DTEND:20070112T143000Z
+SUMMARY:Test UTF-8
+DESCRIPTION;CHARSET=UTF-8:ÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃ
+LOCATION;CHARSET=UTF-8:XXXXÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃ
+END:VEVENT
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vnotes/vnote-minimal.vnt b/debian/opensync/opensync-0.22/tests/data/vnotes/vnote-minimal.vnt
new file mode 100644
index 00000000..e323ab1b
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vnotes/vnote-minimal.vnt
@@ -0,0 +1,5 @@
+BEGIN:VNOTE
+VERSION:1.1
+BODY:This is just a test
+END:VNOTE
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vnotes/vnote1-same.vnt b/debian/opensync/opensync-0.22/tests/data/vnotes/vnote1-same.vnt
new file mode 100644
index 00000000..860791e1
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vnotes/vnote1-same.vnt
@@ -0,0 +1,10 @@
+BEGIN:VNOTE
+VERSION:1.1
+X-IRMC-LUID:someuid5
+DCREATED:2005-04-07
+LAST-MODIFIED:2005-04-08
+SUMMARY:This is a summary
+BODY:This is just a test
+CATEGORIES:Birthday,Friends
+CLASS:PUBLIC
+END:VNOTE
diff --git a/debian/opensync/opensync-0.22/tests/data/vnotes/vnote1-similar.vnt b/debian/opensync/opensync-0.22/tests/data/vnotes/vnote1-similar.vnt
new file mode 100644
index 00000000..d9204e6f
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vnotes/vnote1-similar.vnt
@@ -0,0 +1,10 @@
+BEGIN:VNOTE
+VERSION:1.1
+X-IRMC-LUID:someuid3
+DCREATED:2005-04-06
+LAST-MODIFIED:2005-04-07
+SUMMARY:This is a summary
+BODY:This is just a test
+CATEGORIES:Birthday,Friends,Test
+CLASS:PRIVATE
+END:VNOTE
diff --git a/debian/opensync/opensync-0.22/tests/data/vnotes/vnote1.vnt b/debian/opensync/opensync-0.22/tests/data/vnotes/vnote1.vnt
new file mode 100644
index 00000000..0824dfdc
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vnotes/vnote1.vnt
@@ -0,0 +1,10 @@
+BEGIN:VNOTE
+VERSION:1.1
+X-IRMC-LUID:someuid
+DCREATED:2005-04-05
+LAST-MODIFIED:2005-04-06
+SUMMARY:This is a summary
+BODY:This is just a test
+CATEGORIES:Birthday,Friends
+CLASS:PUBLIC
+END:VNOTE
diff --git a/debian/opensync/opensync-0.22/tests/data/vnotes/vnote2.vnt b/debian/opensync/opensync-0.22/tests/data/vnotes/vnote2.vnt
new file mode 100644
index 00000000..2197ab4b
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vnotes/vnote2.vnt
@@ -0,0 +1,10 @@
+BEGIN:VNOTE
+VERSION:1.1
+X-IRMC-LUID:someuid2
+DCREATED:2005-04-05T01:01:01Z
+LAST-MODIFIED:2005-04-06T01:01:01Z
+SUMMARY:This is a summary
+BODY:This is just a test lines
+CATEGORIES:Birthday,Friends
+CLASS:PRIVATE
+END:VNOTE
diff --git a/debian/opensync/opensync-0.22/tests/data/vnotes/vnote3.vnt b/debian/opensync/opensync-0.22/tests/data/vnotes/vnote3.vnt
new file mode 100644
index 00000000..1b065955
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vnotes/vnote3.vnt
@@ -0,0 +1,8 @@
+BEGIN:VNOTE
+VERSION:1.1
+DCREATED:20050405
+LAST-MODIFIED:20050406
+SUMMARY:This is a summary
+BODY:This is a multi\nline\nbody with special chars
+CLASS:CONFIDENTIAL
+END:VNOTE
diff --git a/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full1.vcf b/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full1.vcf
new file mode 100644
index 00000000..3a736123
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full1.vcf
@@ -0,0 +1,51 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTIMEZONE
+TZID:/softwarestudio.org/Olson_20011030_5/Asia/Baghdad
+X-LIC-LOCATION:Asia/Baghdad
+BEGIN:DAYLIGHT
+TZOFFSETFROM:+0300
+TZOFFSETTO:+0400
+TZNAME:ADT
+DTSTART:19700401T030000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=4
+END:DAYLIGHT
+BEGIN:STANDARD
+TZOFFSETFROM:+0400
+TZOFFSETTO:+0300
+TZNAME:AST
+DTSTART:19701001T040000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=10
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VTIMEZONE
+TZID:/softwarestudio.org/Olson_20011030_4/Africa/Douala
+X-LIC-LOCATION:Africa/Douala
+BEGIN:STANDARD
+TZOFFSETFROM:+0100
+TZOFFSETTO:+0100
+TZNAME:WAT
+DTSTART:19700101T000000
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VTODO
+UID:20050306T005538Z-4378-1000-1-28@azrael
+DTSTAMP:20050306T005538Z
+SUMMARY:summary
+DESCRIPTION:Description
+DUE;TZID=/softwarestudio.org/Olson_20011030_4/Africa/Douala:
+ 20050330T003000
+DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Asia/Baghdad:
+ 20050306T010000
+CLASS:PUBLIC
+CATEGORIES:Birthday\,Business
+PERCENT-COMPLETE:0
+PRIORITY:0
+URL:webpage
+SEQUENCE:1
+CREATED:20050306T005650
+LAST-MODIFIED:20050306T005650
+END:VTODO
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full2.vcf b/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full2.vcf
new file mode 100644
index 00000000..c27e212e
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full2.vcf
@@ -0,0 +1,22 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTODO
+UID:20050306T005538Z-4378-1000-1-28@azrael
+DTSTAMP:20050306T005538Z
+SUMMARY:summary
+DUE:20050330T003000
+DTSTART:20050306T010000Z
+CLASS:PRIVATE
+CATEGORIES:Birthday\,Business
+PERCENT-COMPLETE:50
+PRIORITY:7
+URL:webpage
+SEQUENCE:2
+CREATED:20050306T005650
+LAST-MODIFIED:2005-03-06T00:56:50
+DESCRIPTION:Description
+STATUS:IN-PROCESS
+END:VTODO
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full3.vcf b/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full3.vcf
new file mode 100644
index 00000000..860aed97
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full3.vcf
@@ -0,0 +1,23 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTODO
+UID:20050306T005538Z-4378-1000-1-28@azrael
+DTSTAMP:20050306T005538Z
+SUMMARY:summary
+DUE:20050330T003000
+DTSTART:20050306T010000
+CLASS:CONFIDENTIAL
+CATEGORIES:Birthday\,Business
+PERCENT-COMPLETE:100
+PRIORITY:5
+URL:webpage
+SEQUENCE:3
+CREATED:20050306T005650
+LAST-MODIFIED:20050306
+STATUS:COMPLETED
+DESCRIPTION:Description
+COMPLETED:20050306T010000Z
+END:VTODO
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full4.vcf b/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full4.vcf
new file mode 100644
index 00000000..5db8583a
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full4.vcf
@@ -0,0 +1,21 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTODO
+UID:20050329T112523Z-4349-1000-1-14@craal
+DTSTAMP:20050329T112523Z
+SUMMARY:full1
+DESCRIPTION:description
+DUE;VALUE=DATE:20050101
+DTSTART;VALUE=DATE:20050102
+CLASS:PUBLIC
+CATEGORIES:Birthday\,Business
+PERCENT-COMPLETE:0
+PRIORITY:3
+URL:webpage
+SEQUENCE:1
+CREATED:20050329T112604
+LAST-MODIFIED:20050329T112604
+END:VTODO
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full5.vcf b/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full5.vcf
new file mode 100644
index 00000000..c21652a9
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full5.vcf
@@ -0,0 +1,42 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTIMEZONE
+TZID:/softwarestudio.org/Olson_20011030_5/Europe/Berlin
+X-LIC-LOCATION:Europe/Berlin
+BEGIN:DAYLIGHT
+TZOFFSETFROM:+0100
+TZOFFSETTO:+0200
+TZNAME:CEST
+DTSTART:19700329T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
+END:DAYLIGHT
+BEGIN:STANDARD
+TZOFFSETFROM:+0200
+TZOFFSETTO:+0100
+TZNAME:CET
+DTSTART:19701025T030000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VTODO
+UID:20050329T112608Z-4349-1000-1-15@craal
+DTSTAMP:20050329T112608Z
+SUMMARY:full2
+DESCRIPTION:desciption2\nmulti\nline
+DUE;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T000000
+DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050102T010000
+CLASS:PRIVATE
+CATEGORIES:Business\,Competition
+PERCENT-COMPLETE:50
+STATUS:IN-PROCESS
+PRIORITY:5
+URL:website
+SEQUENCE:1
+CREATED:20050329T112653
+LAST-MODIFIED:20050329T112653
+END:VTODO
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full6.vcf b/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full6.vcf
new file mode 100644
index 00000000..72dbc93e
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full6.vcf
@@ -0,0 +1,59 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTIMEZONE
+TZID:/softwarestudio.org/Olson_20011030_5/Europe/Moscow
+X-LIC-LOCATION:Europe/Moscow
+BEGIN:DAYLIGHT
+TZOFFSETFROM:+0300
+TZOFFSETTO:+0400
+TZNAME:MSD
+DTSTART:19700329T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
+END:DAYLIGHT
+BEGIN:STANDARD
+TZOFFSETFROM:+0400
+TZOFFSETTO:+0300
+TZNAME:MSK
+DTSTART:19701025T030000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VTIMEZONE
+TZID:/softwarestudio.org/Olson_20011030_5/America/Los_Angeles
+X-LIC-LOCATION:America/Los_Angeles
+BEGIN:STANDARD
+TZOFFSETFROM:-0700
+TZOFFSETTO:-0800
+TZNAME:PST
+DTSTART:19701025T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
+END:STANDARD
+BEGIN:DAYLIGHT
+TZOFFSETFROM:-0800
+TZOFFSETTO:-0700
+TZNAME:PDT
+DTSTART:19700405T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=4
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VTODO
+UID:20050329T112655Z-4349-1000-1-16@craal
+DTSTAMP:20050329T112655Z
+SUMMARY:full3
+DUE;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Moscow:
+ 20050101T000000
+DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/America/Los_Angeles:
+ 20050101T010000
+CLASS:CONFIDENTIAL
+PERCENT-COMPLETE:100
+STATUS:COMPLETED
+PRIORITY:7
+COMPLETED:20050108T230000Z
+URL:website
+SEQUENCE:1
+CREATED:20050329T112740
+LAST-MODIFIED:20050329T112740
+END:VTODO
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full7.vcf b/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full7.vcf
new file mode 100644
index 00000000..c15d23ba
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full7.vcf
@@ -0,0 +1,20 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTODO
+UID:20050329T112744Z-4349-1000-1-17@craal
+DTSTAMP:20050329T112744Z
+SUMMARY:full4
+DESCRIPTION:
+ desfeefä\nüöüfeü\nöüü+#+´ßß?\\=0)()/(&/%&$§\"!{[]}\\\,\;:
+ |||><jj°j
+CLASS:PUBLIC
+PERCENT-COMPLETE:0
+STATUS:CANCELLED
+PRIORITY:0
+SEQUENCE:1
+CREATED:20050329T112842
+LAST-MODIFIED:20050329T112842
+END:VTODO
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-simple.vcf b/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-simple.vcf
new file mode 100644
index 00000000..1f472442
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-simple.vcf
@@ -0,0 +1,16 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTODO
+UID:20050329T112458Z-4349-1000-1-13@craal
+DTSTAMP:20050329T112458Z
+SUMMARY:simple
+CLASS:PUBLIC
+PERCENT-COMPLETE:0
+PRIORITY:0
+SEQUENCE:1
+CREATED:20050329T112521
+LAST-MODIFIED:20050329T112521
+END:VTODO
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vtodos/kdepim/todo-full1.vcs b/debian/opensync/opensync-0.22/tests/data/vtodos/kdepim/todo-full1.vcs
new file mode 100644
index 00000000..5b70b270
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vtodos/kdepim/todo-full1.vcs
@@ -0,0 +1,21 @@
+BEGIN:VCALENDAR
+PRODID:-//K Desktop Environment//NONSGML libkcal 3.2//EN
+VERSION:1.0
+BEGIN:VTODO
+DUE:20050313T010300Z
+DTSTART:20050306T010300Z
+DCREATED:20050306T010522Z
+UID:libkcal-862506927.303
+SEQUENCE:1
+X-ORGANIZER:MAILTO:armin.bauer@desscon.com
+ATTENDEE;RSVP=TRUE;STATUS=NEEDS ACTION:MAILTO:Firstname Lastname <name@domain.com>
+DESCRIPTION:Description
+SUMMARY:title
+LOCATION:location
+STATUS:NEEDS_ACTION
+PRIORITY:3
+CATEGORIES:Birthday;Business
+END:VTODO
+
+END:VCALENDAR
+
diff --git a/debian/opensync/opensync-0.22/tests/mock-plugin/Makefile.am b/debian/opensync/opensync-0.22/tests/mock-plugin/Makefile.am
new file mode 100644
index 00000000..675bd581
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/mock-plugin/Makefile.am
@@ -0,0 +1,22 @@
+INCLUDES = @PACKAGE_CFLAGS@ -I$(top_srcdir)
+
+AM_CFLAGS = -Wall -Werror @XML_CFLAGS@ @GCOV_CFLAGS@
+AM_LDFLAGS = -rpath @libdir@
+
+EXTRA_DIST = mock_sync.h Makefile.in
+
+if ENABLE_TESTS
+formatsdir=@OPENSYNC_FORMATSDIR@
+formats_LTLIBRARIES = mockformat.la
+
+pluginsdir=@OPENSYNC_PLUGINDIR@
+plugins_LTLIBRARIES = mock_sync.la
+endif
+
+mock_sync_la_SOURCES = mock_sync.c
+mock_sync_la_LDFLAGS = -avoid-version -export-dynamic -module @GCOV_LDFLAGS@
+mock_sync_la_LIBADD = @PACKAGE_LIBS@ @LIBS@
+
+mockformat_la_SOURCES = mock_format.c
+mockformat_la_LDFLAGS = -avoid-version -export-dynamic -module @GCOV_LDFLAGS@
+mockformat_la_LIBADD = @PACKAGE_LIBS@ @LIBS@
diff --git a/debian/opensync/opensync-0.22/tests/mock-plugin/Makefile.in b/debian/opensync/opensync-0.22/tests/mock-plugin/Makefile.in
new file mode 100644
index 00000000..68394809
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/mock-plugin/Makefile.in
@@ -0,0 +1,554 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = tests/mock-plugin
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(formatsdir)" "$(DESTDIR)$(pluginsdir)"
+formatsLTLIBRARIES_INSTALL = $(INSTALL)
+pluginsLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(formats_LTLIBRARIES) $(plugins_LTLIBRARIES)
+mock_sync_la_DEPENDENCIES =
+am_mock_sync_la_OBJECTS = mock_sync.lo
+mock_sync_la_OBJECTS = $(am_mock_sync_la_OBJECTS)
+@ENABLE_TESTS_TRUE@am_mock_sync_la_rpath = -rpath $(pluginsdir)
+mockformat_la_DEPENDENCIES =
+am_mockformat_la_OBJECTS = mock_format.lo
+mockformat_la_OBJECTS = $(am_mockformat_la_OBJECTS)
+@ENABLE_TESTS_TRUE@am_mockformat_la_rpath = -rpath $(formatsdir)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(mock_sync_la_SOURCES) $(mockformat_la_SOURCES)
+DIST_SOURCES = $(mock_sync_la_SOURCES) $(mockformat_la_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BUILD_ENGINE = @BUILD_ENGINE@
+BUILD_ENGINE_FALSE = @BUILD_ENGINE_FALSE@
+BUILD_ENGINE_TRUE = @BUILD_ENGINE_TRUE@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHECK_CFLAGS = @CHECK_CFLAGS@
+CHECK_LIBS = @CHECK_LIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_DEBUG = @ENABLE_DEBUG@
+ENABLE_PROF_FALSE = @ENABLE_PROF_FALSE@
+ENABLE_PROF_TRUE = @ENABLE_PROF_TRUE@
+ENABLE_TESTS_FALSE = @ENABLE_TESTS_FALSE@
+ENABLE_TESTS_TRUE = @ENABLE_TESTS_TRUE@
+ENABLE_TOOLS_FALSE = @ENABLE_TOOLS_FALSE@
+ENABLE_TOOLS_TRUE = @ENABLE_TOOLS_TRUE@
+ENABLE_TRACE = @ENABLE_TRACE@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GCOV_CFLAGS = @GCOV_CFLAGS@
+GCOV_LDFLAGS = @GCOV_LDFLAGS@
+GREP = @GREP@
+HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@
+HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+OPENSYNC_CONFIGDIR = @OPENSYNC_CONFIGDIR@
+OPENSYNC_ENGINEHEADERDIR = @OPENSYNC_ENGINEHEADERDIR@
+OPENSYNC_FORMATSDIR = @OPENSYNC_FORMATSDIR@
+OPENSYNC_HEADERDIR = @OPENSYNC_HEADERDIR@
+OPENSYNC_PLUGINDIR = @OPENSYNC_PLUGINDIR@
+OSPLUGIN = @OSPLUGIN@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_CFLAGS = @PACKAGE_CFLAGS@
+PACKAGE_LIBS = @PACKAGE_LIBS@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PYTHON = @PYTHON@
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SWIG = @SWIG@
+SWIG_LIB = @SWIG_LIB@
+SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@
+SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@
+VERSION = @VERSION@
+XML_CFLAGS = @XML_CFLAGS@
+XML_LIBS = @XML_LIBS@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_workaround_abs_builddir = @ac_workaround_abs_builddir@
+ac_workaround_abs_srcdir = @ac_workaround_abs_srcdir@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+INCLUDES = @PACKAGE_CFLAGS@ -I$(top_srcdir)
+AM_CFLAGS = -Wall -Werror @XML_CFLAGS@ @GCOV_CFLAGS@
+AM_LDFLAGS = -rpath @libdir@
+EXTRA_DIST = mock_sync.h Makefile.in
+@ENABLE_TESTS_TRUE@formatsdir = @OPENSYNC_FORMATSDIR@
+@ENABLE_TESTS_TRUE@formats_LTLIBRARIES = mockformat.la
+@ENABLE_TESTS_TRUE@pluginsdir = @OPENSYNC_PLUGINDIR@
+@ENABLE_TESTS_TRUE@plugins_LTLIBRARIES = mock_sync.la
+mock_sync_la_SOURCES = mock_sync.c
+mock_sync_la_LDFLAGS = -avoid-version -export-dynamic -module @GCOV_LDFLAGS@
+mock_sync_la_LIBADD = @PACKAGE_LIBS@ @LIBS@
+mockformat_la_SOURCES = mock_format.c
+mockformat_la_LDFLAGS = -avoid-version -export-dynamic -module @GCOV_LDFLAGS@
+mockformat_la_LIBADD = @PACKAGE_LIBS@ @LIBS@
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/mock-plugin/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign tests/mock-plugin/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-formatsLTLIBRARIES: $(formats_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(formatsdir)" || $(mkdir_p) "$(DESTDIR)$(formatsdir)"
+ @list='$(formats_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=install $(formatsLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(formatsdir)/$$f'"; \
+ $(LIBTOOL) --mode=install $(formatsLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(formatsdir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-formatsLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @set -x; list='$(formats_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(formatsdir)/$$p'"; \
+ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(formatsdir)/$$p"; \
+ done
+
+clean-formatsLTLIBRARIES:
+ -test -z "$(formats_LTLIBRARIES)" || rm -f $(formats_LTLIBRARIES)
+ @list='$(formats_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+install-pluginsLTLIBRARIES: $(plugins_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(pluginsdir)" || $(mkdir_p) "$(DESTDIR)$(pluginsdir)"
+ @list='$(plugins_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=install $(pluginsLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pluginsdir)/$$f'"; \
+ $(LIBTOOL) --mode=install $(pluginsLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pluginsdir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-pluginsLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @set -x; list='$(plugins_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(pluginsdir)/$$p'"; \
+ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(pluginsdir)/$$p"; \
+ done
+
+clean-pluginsLTLIBRARIES:
+ -test -z "$(plugins_LTLIBRARIES)" || rm -f $(plugins_LTLIBRARIES)
+ @list='$(plugins_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+mock_sync.la: $(mock_sync_la_OBJECTS) $(mock_sync_la_DEPENDENCIES)
+ $(LINK) $(am_mock_sync_la_rpath) $(mock_sync_la_LDFLAGS) $(mock_sync_la_OBJECTS) $(mock_sync_la_LIBADD) $(LIBS)
+mockformat.la: $(mockformat_la_OBJECTS) $(mockformat_la_DEPENDENCIES)
+ $(LINK) $(am_mockformat_la_rpath) $(mockformat_la_LDFLAGS) $(mockformat_la_OBJECTS) $(mockformat_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mock_format.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mock_sync.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+ for dir in "$(DESTDIR)$(formatsdir)" "$(DESTDIR)$(pluginsdir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-formatsLTLIBRARIES clean-generic clean-libtool \
+ clean-pluginsLTLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-formatsLTLIBRARIES install-pluginsLTLIBRARIES
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-formatsLTLIBRARIES uninstall-info-am \
+ uninstall-pluginsLTLIBRARIES
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean \
+ clean-formatsLTLIBRARIES clean-generic clean-libtool \
+ clean-pluginsLTLIBRARIES ctags distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-exec install-exec-am \
+ install-formatsLTLIBRARIES install-info install-info-am \
+ install-man install-pluginsLTLIBRARIES install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-formatsLTLIBRARIES \
+ uninstall-info-am uninstall-pluginsLTLIBRARIES
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/debian/opensync/opensync-0.22/tests/mock-plugin/mock_format.c b/debian/opensync/opensync-0.22/tests/mock-plugin/mock_format.c
new file mode 100644
index 00000000..f8e34672
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/mock-plugin/mock_format.c
@@ -0,0 +1,137 @@
+/*
+ * file - A plugin for file objects for the opensync framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#include <opensync/opensync.h>
+#include <glib.h>
+#include "mock_sync.h"
+
+static OSyncConvCmpResult compare_file(OSyncChange *leftchange, OSyncChange *rightchange)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, leftchange, rightchange);
+
+ osync_bool data_same = FALSE;
+ osync_bool path_same = FALSE;
+
+ if (!strcmp(osync_change_get_uid(leftchange), osync_change_get_uid(rightchange)))
+ path_same = TRUE;
+
+ if (osync_change_get_datasize(leftchange) == osync_change_get_datasize(rightchange)) {
+ if (osync_change_get_data(leftchange) == osync_change_get_data(rightchange)) {
+ data_same = TRUE;
+ } else {
+ if (!memcmp(osync_change_get_data(leftchange), osync_change_get_data(rightchange), osync_change_get_datasize(leftchange)))
+ data_same = TRUE;
+ }
+ }
+
+ if (data_same && path_same) {
+ osync_trace(TRACE_EXIT, "%s: Same", __func__);
+ return CONV_DATA_SAME;
+ }
+ if (path_same) {
+ osync_trace(TRACE_EXIT, "%s: Similar", __func__);
+ return CONV_DATA_SIMILAR;
+ }
+ osync_trace(TRACE_EXIT, "%s: Mismatch", __func__);
+ return CONV_DATA_MISMATCH;
+}
+
+static osync_bool conv_file_to_plain(void *user_data, char *input, int inpsize, char **output, int *outpsize, osync_bool *free_input, OSyncError **error)
+{
+ osync_debug("FILE", 4, "start: %s", __func__);
+
+ *free_input = FALSE;
+ *output = input;
+ *outpsize = inpsize;
+ return TRUE;
+}
+
+static osync_bool conv_plain_to_file(void *user_data, char *input, int inpsize, char **output, int *outpsize, osync_bool *free_input, OSyncError **error)
+{
+ osync_debug("FILE", 4, "start: %s", __func__);
+
+ *free_input = FALSE;
+ *output = input;
+ *outpsize = inpsize;
+ return TRUE;
+}
+
+static void destroy_file(char *input, size_t inpsize)
+{
+ g_free(input);
+}
+
+static void duplicate_file(OSyncChange *change)
+{
+ osync_debug("FILE", 4, "start: %s", __func__);
+ char *newuid = g_strdup_printf ("%s-dupe", osync_change_get_uid(change));
+ osync_change_set_uid(change, newuid);
+ g_free(newuid);
+}
+
+static osync_bool copy_file(const char *input, int inpsize, char **output, int *outpsize)
+{
+ osync_debug("FILE", 4, "start: %s", __func__);
+
+ char *new = NULL;
+
+ if (inpsize) {
+ new = g_malloc0(inpsize);
+ memcpy(new, input, inpsize);
+ }
+
+ *output = new;
+ *outpsize = inpsize;
+ return TRUE;
+}
+
+static void create_file(OSyncChange *change)
+{
+ osync_debug("FILE", 4, "start: %s", __func__);
+
+ char *data = osync_rand_str(g_random_int_range(1, 100));
+ osync_change_set_data(change, data, strlen(data) + 1, TRUE);
+ if (!osync_change_get_uid(change))
+ osync_change_set_uid(change, osync_rand_str(6));
+}
+
+static char *print_file(OSyncChange *change)
+{
+ osync_debug("FILE", 4, "start: %s", __func__);
+
+ char *printable = g_strdup_printf ("File: %s\nSize: %i", osync_change_get_uid(change), osync_change_get_datasize(change));
+ return printable;
+}
+
+void get_info(OSyncEnv *env)
+{
+ osync_env_register_objtype(env, "data");
+ osync_env_register_objformat(env, "data", "mockformat");
+ osync_env_format_set_compare_func(env, "mockformat", compare_file);
+ osync_env_format_set_duplicate_func(env, "mockformat", duplicate_file);
+ osync_env_format_set_destroy_func(env, "mockformat", destroy_file);
+ osync_env_format_set_print_func(env, "mockformat", print_file);
+ osync_env_format_set_copy_func(env, "mockformat", copy_file);
+ osync_env_format_set_create_func(env, "mockformat", create_file);
+
+ osync_env_format_set_create_func(env, "mockformat", create_file);
+ osync_env_register_converter(env, CONVERTER_DECAP, "mockformat", "plain", conv_file_to_plain);
+ osync_env_register_converter(env, CONVERTER_ENCAP, "plain", "mockformat", conv_plain_to_file);
+}
diff --git a/debian/opensync/opensync-0.22/tests/mock-plugin/mock_sync.c b/debian/opensync/opensync-0.22/tests/mock-plugin/mock_sync.c
new file mode 100644
index 00000000..63ec969e
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/mock-plugin/mock_sync.c
@@ -0,0 +1,559 @@
+/*
+ * mock-sync - A mock-plugin for the opensync framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#include "mock_sync.h"
+
+#define fail(x) abort()
+
+#define fail_unless(condition, msg) do { \
+ if (!condition) fail(msg); \
+ } while (0)
+
+int mock_custom_function(mock_env *env, int input, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %i, %p)", __func__, env, input, error);
+
+ fail_unless(input == 1, NULL);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return 2;
+}
+
+/*Load the state from a xml file and return it in the conn struct*/
+static osync_bool mock_parse_settings(mock_env *env, char *data, int size, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %i)", __func__, env, data, size);
+ xmlDocPtr doc;
+ xmlNodePtr cur;
+
+ //set defaults
+ env->path = NULL;
+
+ doc = xmlParseMemory(data, size);
+
+ if (!doc) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Unable to parse settings");
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+ }
+
+ cur = xmlDocGetRootElement(doc);
+
+ if (!cur) {
+ xmlFreeDoc(doc);
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Unable to get root element of the settings");
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+ }
+
+ if (xmlStrcmp(cur->name, (xmlChar*)"config")) {
+ xmlFreeDoc(doc);
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Config valid is not valid");
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+ }
+
+ cur = cur->xmlChildrenNode;
+
+ while (cur != NULL) {
+ char *str = (char*)xmlNodeGetContent(cur);
+ if (str) {
+ if (!xmlStrcmp(cur->name, (const xmlChar *)"path")) {
+ env->path = g_strdup(str);
+ }
+ xmlFree(str);
+ }
+ cur = cur->next;
+ }
+
+ xmlFreeDoc(doc);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+}
+
+static osync_bool mock_get_error(OSyncMember *member, const char *domain)
+{
+ const char *env = g_getenv(domain);
+ if (!env)
+ return FALSE;
+
+ int num = atoi(env);
+ int mask = 1 << (osync_member_get_id(member) - 1);
+ if (num & mask) {
+ char *chancestr = g_strdup_printf("%s_PROB", domain);
+ const char *chance = g_getenv(chancestr);
+ g_free(chancestr);
+ if (!chance)
+ return TRUE;
+ int prob = atoi(chance);
+ if (prob >= g_random_int_range(0, 100))
+ return TRUE;
+ }
+ return FALSE;
+}
+
+static void *mock_initialize(OSyncMember *member, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, member, error);
+
+ if (mock_get_error(member, "INIT_NULL")) {
+ osync_error_set(error, OSYNC_ERROR_EXPECTED, "Triggering INIT_NULL error");
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return NULL;
+ }
+ char *configdata;
+ int configsize;
+ mock_env *env = g_malloc0(sizeof(mock_env));
+
+ if (!osync_member_get_config(member, &configdata, &configsize, error)) {
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return NULL;
+ }
+
+ if (!mock_parse_settings(env, configdata, configsize, error)) {
+ g_free(env);
+ return NULL;
+ }
+
+ //Rewrite the batch commit functions so we can disable them if necessary
+ if (!mock_get_error(member, "BATCH_COMMIT")) {
+ OSyncObjFormatSink *fmtsink = member->format_sinks->data;
+ osync_trace(TRACE_INTERNAL, "Disabling batch_commit on %p:%s: %i", fmtsink, fmtsink->format ? fmtsink->format->name : "None", g_list_length(member->format_sinks));
+ OSyncFormatFunctions *functions = &(fmtsink->functions);
+ functions->batch_commit = NULL;
+ }
+
+ env->member = member;
+ env->hashtable = osync_hashtable_new();
+
+ osync_trace(TRACE_EXIT, "%s: %p", __func__, env);
+ return (void *)env;
+}
+
+static void mock_connect(OSyncContext *ctx)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, ctx);
+ mock_env *env = (mock_env *)osync_context_get_plugin_data(ctx);
+
+ env->committed_all = TRUE;
+
+ if (mock_get_error(env->member, "CONNECT_ERROR")) {
+ osync_context_report_error(ctx, OSYNC_ERROR_EXPECTED, "Triggering CONNECT_ERROR error");
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, "Triggering CONNECT_ERROR error");
+ return;
+ }
+
+ if (mock_get_error(env->member, "CONNECT_TIMEOUT")) {
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, "Triggering CONNECT_TIMEOUT error");
+ return;
+ }
+
+ OSyncError *error = NULL;
+ if (!osync_hashtable_load(env->hashtable, env->member, &error)) {
+ osync_context_report_osyncerror(ctx, &error);
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(&error));
+ osync_error_free(&error);
+ return;
+ }
+
+ if (!osync_anchor_compare(env->member, "path", env->path))
+ osync_member_set_slow_sync(env->member, "data", TRUE);
+
+ GError *direrror = NULL;
+
+ env->dir = g_dir_open(env->path, 0, &direrror);
+ if (direrror) {
+ //Unable to open directory
+ osync_context_report_error(ctx, OSYNC_ERROR_FILE_NOT_FOUND, "Unable to open directory %s", env->path);
+ g_error_free (direrror);
+ } else {
+ osync_context_report_success(ctx);
+ }
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+static char *mock_generate_hash(struct stat *buf)
+{
+ char *hash = g_strdup_printf("%i-%i", (int)buf->st_mtime, (int)buf->st_ctime);
+ return hash;
+}
+
+static void mock_get_changeinfo(OSyncContext *ctx)
+{
+ mock_env *env = (mock_env *)osync_context_get_plugin_data(ctx);
+
+ if (mock_get_error(env->member, "GET_CHANGES_ERROR")) {
+ osync_context_report_error(ctx, OSYNC_ERROR_EXPECTED, "Triggering GET_CHANGES_ERROR error");
+ return;
+ }
+ if (mock_get_error(env->member, "GET_CHANGES_TIMEOUT"))
+ return;
+ if (mock_get_error(env->member, "GET_CHANGES_TIMEOUT2"))
+ sleep(8);
+
+ if (osync_member_get_slow_sync(env->member, "data")) {
+ osync_debug("FILE-SYNC", 3, "Slow sync requested");
+ osync_hashtable_set_slow_sync(env->hashtable, "data");
+ }
+
+ GDir *dir;
+ GError *gerror = NULL;
+ const char *de = NULL;
+
+ dir = g_dir_open(env->path, 0, &gerror);
+ if (!dir) {
+ osync_trace(TRACE_EXIT_ERROR, "mock_report_dir: Unable to open directory %s: %s", env->path, gerror ? gerror->message : "None");
+ return;
+ }
+ while ((de = g_dir_read_name(dir))) {
+ char *filename = g_build_filename(env->path, de, NULL);
+ if (g_file_test(filename, G_FILE_TEST_IS_REGULAR)) {
+ /* Report normal files */
+ OSyncChange *change = osync_change_new();
+ osync_change_set_member(change, env->member);
+ osync_change_set_uid(change, de);
+
+ osync_change_set_objformat_string(change, "mockformat");
+
+ struct stat buf;
+ stat(filename, &buf);
+ char *hash = mock_generate_hash(&buf);
+ osync_change_set_hash(change, hash);
+
+ if (mock_get_error(env->member, "ONLY_INFO")) {
+ osync_change_set_data(change, NULL, 0, FALSE);
+ } else {
+ char *data = NULL;
+ int size = 0;
+ OSyncError *error = NULL;
+ if (!osync_file_read(filename, &data, &size, &error)) {
+ osync_context_report_osyncerror(ctx, &error);
+ g_free(filename);
+ return;
+ }
+
+ osync_change_set_data(change, data, size, TRUE);
+ }
+
+ if (mock_get_error(env->member, "SLOW_REPORT"))
+ sleep(1);
+
+ if (osync_hashtable_detect_change(env->hashtable, change)) {
+ osync_context_report_change(ctx, change);
+ osync_hashtable_update_hash(env->hashtable, change);
+ }
+ g_free(hash);
+
+
+ }
+ }
+ g_dir_close(dir);
+ osync_hashtable_report_deleted(env->hashtable, ctx, "data");
+
+ fail_unless(env->committed_all == TRUE, NULL);
+ env->committed_all = FALSE;
+
+ osync_context_report_success(ctx);
+}
+
+static void mock_get_data(OSyncContext *ctx, OSyncChange *change)
+{
+ mock_env *env = (mock_env *)osync_context_get_plugin_data(ctx);
+
+ if (mock_get_error(env->member, "GET_DATA_ERROR")) {
+ osync_context_report_error(ctx, OSYNC_ERROR_EXPECTED, "Triggering GET_DATA_ERROR error");
+ return;
+ }
+ if (mock_get_error(env->member, "GET_DATA_TIMEOUT"))
+ return;
+
+ char *filename = g_strdup_printf("%s/%s", env->path, osync_change_get_uid(change));
+ char *data = NULL;
+ int size = 0;
+ OSyncError *error = NULL;
+ if (!osync_file_read(filename, &data, &size, &error)) {
+ osync_context_report_osyncerror(ctx, &error);
+ g_free(filename);
+ return;
+ }
+
+ osync_change_set_data(change, data, size, TRUE);
+ g_free(filename);
+
+ osync_context_report_success(ctx);
+}
+
+static void mock_read(OSyncContext *ctx, OSyncChange *change)
+{
+ mock_env *env = (mock_env *)osync_context_get_plugin_data(ctx);
+
+ char *filename = g_strdup_printf("%s/%s", env->path, osync_change_get_uid(change));
+
+ char *data = NULL;
+ int size = 0;
+ OSyncError *error = NULL;
+ if (!osync_file_read(filename, &data, &size, &error)) {
+ osync_context_report_osyncerror(ctx, &error);
+ g_free(filename);
+ return;
+ }
+
+ osync_change_set_data(change, data, size, TRUE);
+
+ g_free(filename);
+
+ osync_context_report_success(ctx);
+}
+
+static osync_bool mock_access(OSyncContext *ctx, OSyncChange *change)
+{
+ /*TODO: Create directory for file, if it doesn't exist */
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, ctx, change);
+
+ mock_env *env = (mock_env *)osync_context_get_plugin_data(ctx);
+
+ char *filename = NULL;
+ OSyncError *error = NULL;
+ filename = g_strdup_printf ("%s/%s", env->path, osync_change_get_uid(change));
+
+ switch (osync_change_get_changetype(change)) {
+ case CHANGE_DELETED:
+ if (!remove(filename) == 0) {
+ osync_debug("FILE-SYNC", 0, "Unable to remove file %s", filename);
+ osync_context_report_error(ctx, OSYNC_ERROR_FILE_NOT_FOUND, "Unable to write");
+ g_free(filename);
+ osync_trace(TRACE_EXIT_ERROR, "%s: Unable to write", __func__);
+ return FALSE;
+ }
+ break;
+ case CHANGE_ADDED:
+ if (g_file_test(filename, G_FILE_TEST_EXISTS)) {
+ osync_debug("FILE-SYNC", 0, "File %s already exists", filename);
+ osync_context_report_error(ctx, OSYNC_ERROR_EXISTS, "Entry already exists");
+ g_free(filename);
+ osync_trace(TRACE_EXIT_ERROR, "%s: Entry already exists", __func__);
+ return FALSE;
+ }
+ /* No break. Continue below */
+ case CHANGE_MODIFIED:
+ //FIXME add permission and ownership for file-sync
+ if (!osync_file_write(filename, osync_change_get_data(change), osync_change_get_datasize(change), 0700, &error)) {
+ osync_debug("FILE-SYNC", 0, "Unable to write to file %s", filename);
+ osync_context_report_osyncerror(ctx, &error);
+ g_free(filename);
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(&error));
+ return FALSE;
+ }
+
+ struct stat buf;
+ stat(filename, &buf);
+ char *hash = mock_generate_hash(&buf);
+ osync_change_set_hash(change, hash);
+ break;
+ default:
+ fail("no changetype given");
+ }
+ g_free(filename);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+}
+
+static osync_bool mock_commit_change(OSyncContext *ctx, OSyncChange *change)
+{
+ osync_debug("FILE-SYNC", 4, "start: %s", __func__);
+ osync_debug("FILE-SYNC", 3, "Writing change %s with changetype %i", osync_change_get_uid(change), osync_change_get_changetype(change));
+ mock_env *env = (mock_env *)osync_context_get_plugin_data(ctx);
+
+ fail_unless(env->committed_all == FALSE, NULL);
+
+ if (mock_get_error(env->member, "COMMIT_ERROR")) {
+ osync_context_report_error(ctx, OSYNC_ERROR_EXPECTED, "Triggering COMMIT_ERROR error");
+ return FALSE;
+ }
+ if (mock_get_error(env->member, "COMMIT_TIMEOUT"))
+ return FALSE;
+
+ if (!mock_access(ctx, change))
+ return FALSE;
+
+ osync_hashtable_update_hash(env->hashtable, change);
+ osync_context_report_success(ctx);
+ osync_debug("FILE-SYNC", 4, "end: %s", __func__);
+ return TRUE;
+}
+
+static void mock_sync_done(OSyncContext *ctx)
+{
+ osync_debug("FILE-SYNC", 3, "start: %s", __func__);
+ mock_env *env = (mock_env *)osync_context_get_plugin_data(ctx);
+
+ if (mock_get_error(env->member, "SYNC_DONE_ERROR")) {
+ osync_context_report_error(ctx, OSYNC_ERROR_EXPECTED, "Triggering SYNC_DONE_ERROR error");
+ return;
+ }
+ if (mock_get_error(env->member, "SYNC_DONE_TIMEOUT"))
+ return;
+
+ osync_anchor_update(env->member, "path", env->path);
+ osync_context_report_success(ctx);
+ osync_debug("FILE-SYNC", 3, "end: %s", __func__);
+}
+
+static void mock_disconnect(OSyncContext *ctx)
+{
+ osync_debug("FILE-SYNC", 3, "start: %s", __func__);
+ mock_env *env = (mock_env *)osync_context_get_plugin_data(ctx);
+
+ if (!g_getenv("NO_COMMITTED_ALL_CHECK"))
+ fail_unless(env->committed_all == TRUE, NULL);
+ env->committed_all = FALSE;
+
+ if (mock_get_error(env->member, "DISCONNECT_ERROR")) {
+ osync_context_report_error(ctx, OSYNC_ERROR_EXPECTED, "Triggering DISCONNECT_ERROR error");
+ return;
+ }
+ if (mock_get_error(env->member, "DISCONNECT_TIMEOUT"))
+ return;
+
+ g_dir_close(env->dir);
+ osync_hashtable_close(env->hashtable);
+ osync_context_report_success(ctx);
+ osync_debug("FILE-SYNC", 3, "end: %s", __func__);
+}
+
+static void mock_finalize(void *data)
+{
+ osync_debug("FILE-SYNC", 3, "start: %s", __func__);
+ mock_env *env = (mock_env *)data;
+ osync_hashtable_free(env->hashtable);
+
+ g_free(env->path);
+ g_free(env);
+}
+
+static osync_bool mock_is_available(OSyncError **error)
+{
+ if (g_getenv("IS_NOT_AVAILABLE")) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "file-sync plugin is not available");
+ return FALSE;
+ }
+ return TRUE;
+}
+
+static void mock_batch_commit(OSyncContext *context, OSyncContext **contexts, OSyncChange **changes)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, context, contexts, changes);
+ mock_env *env = (mock_env *)osync_context_get_plugin_data(context);
+
+ fail_unless(env->committed_all == FALSE, NULL);
+ env->committed_all = TRUE;
+
+ int i;
+ for (i = 0; contexts[i]; i++) {
+ if (mock_access(contexts[i], changes[i])) {
+ osync_hashtable_update_hash(env->hashtable, changes[i]);
+ osync_context_report_success(contexts[i]);
+ }
+ }
+
+ if (g_getenv("NUM_BATCH_COMMITS")) {
+ int req = atoi(g_getenv("NUM_BATCH_COMMITS"));
+ fail_unless(req == i, NULL);
+ }
+
+ if (mock_get_error(env->member, "COMMITTED_ALL_ERROR")) {
+ osync_context_report_error(context, OSYNC_ERROR_EXPECTED, "Triggering COMMITTED_ALL_ERROR error");
+ return;
+ }
+
+ osync_context_report_success(context);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+static void mock_committed_all(OSyncContext *context)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, context);
+ mock_env *env = (mock_env *)osync_context_get_plugin_data(context);
+
+ fail_unless(env->committed_all == FALSE, NULL);
+ env->committed_all = TRUE;
+
+ if (mock_get_error(env->member, "COMMITTED_ALL_ERROR")) {
+ osync_context_report_error(context, OSYNC_ERROR_EXPECTED, "Triggering COMMITTED_ALL_ERROR error");
+ osync_trace(TRACE_EXIT_ERROR, "%s: Reporting error", __func__);
+ return;
+ }
+
+ osync_context_report_success(context);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+void get_info(OSyncEnv *env)
+{
+ OSyncPluginInfo *info = osync_plugin_new_info(env);
+
+ info->name = "file-sync";
+ info->longname = "Mock Plugin";
+ info->description = "Mock Plugin";
+ info->version = 1;
+
+ info->functions.initialize = mock_initialize;
+ info->functions.connect = mock_connect;
+ info->functions.sync_done = mock_sync_done;
+ info->functions.disconnect = mock_disconnect;
+ info->functions.finalize = mock_finalize;
+ info->functions.get_changeinfo = mock_get_changeinfo;
+ info->functions.get_data = mock_get_data;
+
+ osync_plugin_accept_objtype(info, "data");
+ osync_plugin_accept_objformat(info, "data", "mockformat", NULL);
+
+ osync_plugin_set_access_objformat(info, "data", "mockformat", mock_access);
+ osync_plugin_set_read_objformat(info, "data", "mockformat", mock_read);
+
+ //Lets reduce the timeouts a bit so the checks work faster
+ info->timeouts.disconnect_timeout = 5;
+ info->timeouts.connect_timeout = 5;
+ info->timeouts.sync_done_timeout = 5;
+ info->timeouts.get_changeinfo_timeout = 5;
+ info->timeouts.get_data_timeout = 5;
+ info->timeouts.commit_timeout = 15;
+
+
+ if (g_getenv("NO_TIMEOUTS")) {
+ info->timeouts.disconnect_timeout = 0;
+ info->timeouts.connect_timeout = 0;
+ info->timeouts.sync_done_timeout = 0;
+ info->timeouts.get_changeinfo_timeout = 0;
+ info->timeouts.get_data_timeout = 0;
+ info->timeouts.commit_timeout = 0;
+ }
+
+ if (g_getenv("IS_AVAILABLE"))
+ info->functions.is_available = mock_is_available;
+
+ osync_plugin_set_batch_commit_objformat(info, "data", "mockformat", mock_batch_commit);
+ osync_plugin_set_commit_objformat(info, "data", "mockformat", mock_commit_change);
+ osync_plugin_set_committed_all_objformat(info, "data", "mockformat", mock_committed_all);
+}
diff --git a/debian/opensync/opensync-0.22/tests/mock-plugin/mock_sync.h b/debian/opensync/opensync-0.22/tests/mock-plugin/mock_sync.h
new file mode 100644
index 00000000..5eb62454
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/mock-plugin/mock_sync.h
@@ -0,0 +1,18 @@
+#include <opensync/opensync.h>
+#include <opensync/opensync_internals.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <glib.h>
+#include <string.h>
+#include <config.h>
+
+#include <libxml/xmlmemory.h>
+#include <libxml/parser.h>
+
+typedef struct mock_env {
+ char *path;
+ OSyncMember *member;
+ GDir *dir;
+ OSyncHashTable *hashtable;
+ osync_bool committed_all;
+} mock_env;
diff --git a/debian/opensync/opensync-0.22/tests/support.c b/debian/opensync/opensync-0.22/tests/support.c
new file mode 100644
index 00000000..18eb8817
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/support.c
@@ -0,0 +1,529 @@
+#include "support.h"
+
+char *olddir = NULL;
+
+static void reset_env(void)
+{
+ unsetenv("CONNECT_ERROR");
+ unsetenv("CONNECT_TIMEOUT");
+ unsetenv("INIT_NULL");
+ unsetenv("GET_CHANGES_ERROR");
+ unsetenv("GET_CHANGES_TIMEOUT");
+ unsetenv("GET_CHANGES_TIMEOUT2");
+ unsetenv("COMMIT_ERROR");
+ unsetenv("COMMIT_TIMEOUT");
+ unsetenv("SYNC_DONE_ERROR");
+ unsetenv("SYNC_DONE_TIMEOUT");
+ unsetenv("DISCONNECT_ERROR");
+ unsetenv("DISCONNECT_TIMEOUT");
+}
+
+char *setup_testbed(char *fkt_name)
+{
+
+ setuid(65534);
+ char *testbed = g_strdup_printf("%s/testbed.XXXXXX", g_get_tmp_dir());
+ mkdtemp(testbed);
+
+ char *command = NULL;
+ if (fkt_name) {
+ command = g_strdup_printf("cp -R "OPENSYNC_TESTDATA"data/%s/* %s", fkt_name, testbed);
+ if (system(command))
+ abort();
+ g_free(command);
+ }
+
+ command = g_strdup_printf("cp -R ../osplugin/osplugin %s", testbed);
+ if (system(command))
+ abort();
+ g_free(command);
+
+ command = g_strdup_printf("cp -R mock-plugin/.libs/*.so %s", testbed);
+ if (system(command))
+ abort();
+ g_free(command);
+
+ command = g_strdup_printf("cp -R ../formats/.libs/*.so %s", testbed);
+ if (system(command))
+ abort();
+ g_free(command);
+
+ command = g_strdup_printf("cp -R ../formats/vformats-xml/.libs/*.so %s", testbed);
+ if (system(command))
+ abort();
+ g_free(command);
+
+ command = g_strdup_printf("chmod -R 700 %s", testbed);
+ if (system(command))
+ abort();
+ g_free(command);
+
+ olddir = g_get_current_dir();
+ if (chdir(testbed))
+ abort();
+
+ osync_trace(TRACE_INTERNAL, "Seting up %s at %s", fkt_name, testbed);
+
+// printf(".");
+// fflush(NULL);
+// fflush(stderr);
+ reset_env();
+ return testbed;
+}
+
+void destroy_testbed(char *path)
+{
+ char *command = g_strdup_printf("rm -rf %s", path);
+ if (olddir)
+ chdir(olddir);
+ system(command);
+ g_free(command);
+ osync_trace(TRACE_INTERNAL, "Tearing down %s", path);
+ g_free(path);
+}
+
+void conflict_handler_choose_first(OSyncEngine *engine, OSyncMapping *mapping, void *user_data)
+{
+ num_conflicts++;
+ fail_unless(osengine_mapping_num_changes(mapping) == GPOINTER_TO_INT(user_data), NULL);
+ fail_unless(num_engine_end_conflicts == 0, NULL);
+
+ OSyncChange *change = osengine_mapping_nth_change(mapping, 0);
+ osengine_mapping_solve(engine, mapping, change);
+}
+
+void conflict_handler_choose_modified(OSyncEngine *engine, OSyncMapping *mapping, void *user_data)
+{
+ num_conflicts++;
+ fail_unless(osengine_mapping_num_changes(mapping) == GPOINTER_TO_INT(user_data), NULL);
+ fail_unless(num_engine_end_conflicts == 0, NULL);
+
+ int i;
+ for (i = 0; i < osengine_mapping_num_changes(mapping); i++) {
+ OSyncChange *change = osengine_mapping_nth_change(mapping, i);
+ if (change->changetype == CHANGE_MODIFIED) {
+ osengine_mapping_solve(engine, mapping, change);
+ return;
+ }
+ }
+ fail();
+}
+
+void conflict_handler_choose_deleted(OSyncEngine *engine, OSyncMapping *mapping, void *user_data)
+{
+ num_conflicts++;
+ fail_unless(osengine_mapping_num_changes(mapping) == GPOINTER_TO_INT(user_data), NULL);
+ fail_unless(num_engine_end_conflicts == 0, NULL);
+
+ int i;
+ for (i = 0; i < osengine_mapping_num_changes(mapping); i++) {
+ OSyncChange *change = osengine_mapping_nth_change(mapping, i);
+ if (change->changetype == CHANGE_DELETED) {
+ osengine_mapping_solve(engine, mapping, change);
+ return;
+ }
+ }
+ fail(NULL);
+}
+
+void conflict_handler_duplication(OSyncEngine *engine, OSyncMapping *mapping, void *user_data)
+{
+ num_conflicts++;
+ fail_unless(osengine_mapping_num_changes(mapping) == GPOINTER_TO_INT(user_data), NULL);
+ fail_unless(num_engine_end_conflicts == 0, NULL);
+
+ osengine_mapping_duplicate(engine, mapping);
+}
+
+void conflict_handler_ignore(OSyncEngine *engine, OSyncMapping *mapping, void *user_data)
+{
+ num_conflicts++;
+ if (user_data)
+ fail_unless(osengine_mapping_num_changes(mapping) == GPOINTER_TO_INT(user_data), NULL);
+ fail_unless(num_engine_end_conflicts == 0, NULL);
+
+ OSyncError *error = NULL;
+ fail_unless(osengine_mapping_ignore_conflict(engine, mapping, &error), NULL);
+ fail_unless(error == NULL, NULL);
+}
+
+
+void conflict_handler_random(OSyncEngine *engine, OSyncMapping *mapping, void *user_data)
+{
+ num_conflicts++;
+ fail_unless(osengine_mapping_num_changes(mapping) == GPOINTER_TO_INT(user_data), NULL);
+ fail_unless(num_engine_end_conflicts == 0, NULL);
+
+ int num = osengine_mapping_num_changes(mapping);
+ int choosen = g_random_int_range(0, num);
+ OSyncChange *change = osengine_mapping_nth_change(mapping, choosen);
+ osengine_mapping_solve(engine, mapping, change);
+}
+
+static void solve_conflict(OSyncMapping *mapping)
+{
+ sleep(5);
+
+ OSyncEngine *engine = mapping->table->engine;
+
+ int i;
+ for (i = 0; i < osengine_mapping_num_changes(mapping); i++) {
+ OSyncChange *change = osengine_mapping_nth_change(mapping, i);
+ if (change->changetype == CHANGE_MODIFIED) {
+ osengine_mapping_solve(engine, mapping, change);
+ return;
+ }
+ }
+}
+
+void conflict_handler_delay(OSyncEngine *engine, OSyncMapping *mapping, void *user_data)
+{
+ num_conflicts++;
+ fail_unless(osengine_mapping_num_changes(mapping) == GPOINTER_TO_INT(user_data), NULL);
+ fail_unless(num_engine_end_conflicts == 0, NULL);
+
+ g_thread_create ((GThreadFunc)solve_conflict, mapping, TRUE, NULL);
+}
+
+void entry_status(OSyncEngine *engine, OSyncChangeUpdate *status, void *user_data)
+{
+ switch (status->type) {
+ case CHANGE_RECEIVED:
+ fail_unless(!osync_error_is_set(&(status->error)), NULL);
+ num_read++;
+ break;
+ case CHANGE_RECEIVED_INFO:
+ fail_unless(!osync_error_is_set(&(status->error)), NULL);
+ num_read_info++;
+ break;
+ case CHANGE_SENT:
+ fail_unless(!osync_error_is_set(&(status->error)), NULL);
+ num_written++;
+ break;
+ case CHANGE_WRITE_ERROR:
+ fail_unless(osync_error_is_set(&(status->error)), NULL);
+ osync_debug("TEST", 4, "CHANGE_WRITE_ERROR: %s", status->error->message);
+ num_written_errors++;
+ break;
+ case CHANGE_RECV_ERROR:
+ fail_unless(osync_error_is_set(&(status->error)), NULL);
+ osync_debug("TEST", 4, "CHANGE_RECV_ERROR: %s", status->error->message);
+ num_recv_errors++;
+ break;
+ }
+}
+
+void member_status(OSyncMemberUpdate *status, void *user_data)
+{
+ mark_point();
+ switch (status->type) {
+ case MEMBER_CONNECTED:
+ fail_unless(!osync_error_is_set(&(status->error)), NULL);
+ num_connected++;
+ break;
+ case MEMBER_DISCONNECTED:
+ fail_unless(!osync_error_is_set(&(status->error)), NULL);
+ num_disconnected++;
+ break;
+ case MEMBER_SENT_CHANGES:
+ fail_unless(!osync_error_is_set(&(status->error)), NULL);
+ num_member_sent_changes++;
+ break;
+ case MEMBER_COMMITTED_ALL:
+ fail_unless(!osync_error_is_set(&(status->error)), NULL);
+ num_member_comitted_all++;
+ break;
+ case MEMBER_CONNECT_ERROR:
+ fail_unless(osync_error_is_set(&(status->error)), NULL);
+ osync_debug("TEST", 4, "MEMBER_CONNECT_ERROR: %s", status->error->message);
+ num_member_connect_errors++;
+ break;
+ case MEMBER_GET_CHANGES_ERROR:
+ fail_unless(osync_error_is_set(&(status->error)), NULL);
+ osync_debug("TEST", 4, "MEMBER_CONNECT_ERROR: %s", status->error->message);
+ num_member_get_changes_errors++;
+ break;
+ case MEMBER_SYNC_DONE_ERROR:
+ fail_unless(osync_error_is_set(&(status->error)), NULL);
+ osync_debug("TEST", 4, "MEMBER_SYNC_DONE_ERROR: %s", status->error->message);
+ num_member_sync_done_errors++;
+ break;
+ case MEMBER_DISCONNECT_ERROR:
+ fail_unless(osync_error_is_set(&(status->error)), NULL);
+ osync_debug("TEST", 4, "MEMBER_DISCONNECT_ERROR: %s", status->error->message);
+ num_member_disconnect_errors++;
+ break;
+ case MEMBER_COMMITTED_ALL_ERROR:
+ fail_unless(osync_error_is_set(&(status->error)), NULL);
+ osync_debug("TEST", 4, "MEMBER_COMMITTED_ALL_ERROR: %s", status->error->message);
+ num_member_comitted_all_errors++;
+ break;
+ }
+}
+
+void engine_status(OSyncEngine *engine, OSyncEngineUpdate *status, void *user_data)
+{
+ switch (status->type) {
+ case ENG_ENDPHASE_CON:
+ fail_unless(!osync_error_is_set(&(status->error)), NULL);
+ osync_debug("TEST", 4, "All clients connected or error");
+ num_engine_connected++;
+ break;
+ case ENG_ENDPHASE_READ:
+ fail_unless(!osync_error_is_set(&(status->error)), NULL);
+ osync_debug("TEST", 4, "All clients sent changes or error");
+ num_engine_read++;
+ break;
+ case ENG_ENDPHASE_WRITE:
+ fail_unless(!osync_error_is_set(&(status->error)), NULL);
+ osync_debug("TEST", 4, "All clients have writen");
+ num_engine_wrote++;
+ break;
+ case ENG_ENDPHASE_DISCON:
+ fail_unless(!osync_error_is_set(&(status->error)), NULL);
+ osync_debug("TEST", 4, "All clients have disconnected");
+ num_engine_disconnected++;
+ break;
+ case ENG_ERROR:
+ fail_unless(osync_error_is_set(&(status->error)), NULL);
+ osync_debug("TEST", 4, "ENG_ERROR: %s", status->error->message);
+ num_engine_errors++;
+ break;
+ case ENG_SYNC_SUCCESSFULL:
+ fail_unless(!osync_error_is_set(&(status->error)), NULL);
+ osync_debug("TEST", 4, "Sync Successfull");
+ num_engine_successfull++;
+ break;
+ case ENG_PREV_UNCLEAN:
+ fail_unless(!osync_error_is_set(&(status->error)), NULL);
+ osync_debug("TEST", 4, "Previous sync was unclean");
+ num_engine_prev_unclean++;
+ break;
+ case ENG_END_CONFLICTS:
+ fail_unless(!osync_error_is_set(&(status->error)), NULL);
+ osync_debug("TEST", 4, "End conflicts");
+ num_engine_end_conflicts++;
+ break;
+ }
+}
+
+void mapping_status(OSyncMappingUpdate *status, void *user_data)
+{
+ switch (status->type) {
+ case MAPPING_SOLVED:
+ fail_unless(!osync_error_is_set(&(status->error)), NULL);
+ osync_debug("TEST", 4, "Mapping solved");
+ break;
+ case MAPPING_SYNCED:
+ fail_unless(!osync_error_is_set(&(status->error)), NULL);
+ osync_debug("TEST", 4, "Mapping Synced");
+ break;
+ case MAPPING_WRITE_ERROR:
+ fail_unless(osync_error_is_set(&(status->error)), NULL);
+ osync_debug("TEST", 4, "MAPPING_WRITE_ERROR: %s", status->error->message);
+ num_mapping_errors++;
+ break;
+ }
+}
+
+OSyncEngine *init_engine(OSyncGroup *group)
+{
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_mappingstatus_callback(engine, mapping_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ mark_point();
+ fail_unless(engine != NULL, NULL);
+ fail_unless(osengine_init(engine, &error), NULL);
+ return engine;
+}
+
+osync_bool synchronize_once(OSyncEngine *engine, OSyncError **error)
+{
+ num_connected = 0;
+ num_disconnected = 0;
+ num_conflicts = 0;
+ num_written = 0;
+ num_read = 0;
+ num_read_info = 0;
+ num_member_connect_errors = 0;
+ num_member_sent_changes = 0;
+ num_engine_errors = 0;
+ num_engine_successfull = 0;
+ num_member_get_changes_errors = 0;
+ num_written_errors = 0;
+ num_mapping_errors = 0;
+ num_member_sync_done_errors = 0;
+ num_member_disconnect_errors = 0;
+ num_engine_prev_unclean = 0;
+ num_engine_end_conflicts = 0;
+ num_engine_connected = 0;
+ num_engine_read = 0;
+ num_engine_wrote = 0;
+ num_engine_disconnected = 0;
+ num_member_comitted_all_errors = 0;
+ num_recv_errors = 0;
+ num_member_comitted_all = 0;
+
+ mark_point();
+ return osengine_sync_and_block(engine, error);
+}
+
+/*needed because of an incompatible API change in 0.94*/
+#if CHECK_VERSION <= 903
+void create_case(Suite *s, const char *name, void (*function)(void))
+#else /*CHECK_VERSION > 903*/
+void create_case(Suite *s, const char *name, void (*function)(int))
+#endif /*CHECK_VERSION*/
+{
+ TCase *tc_new = tcase_create(name);
+ tcase_set_timeout(tc_new, 30);
+ suite_add_tcase (s, tc_new);
+ tcase_add_test(tc_new, function);
+}
+
+OSyncMappingTable *mappingtable_load(OSyncGroup *group, int num_mappings, int num_unmapped)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %i, %i)", __func__, group, num_mappings, num_unmapped);
+ mark_point();
+ OSyncEnv *osync = init_env();
+ OSyncGroup *newgroup = osync_group_load(osync, "configs/group", NULL);
+ OSyncMappingTable *maptable = _osengine_mappingtable_load_group(newgroup);
+ mark_point();
+ fail_unless(g_list_length(maptable->mappings) == num_mappings, NULL);
+ fail_unless(g_list_length(maptable->unmapped) == num_unmapped, NULL);
+ osync_trace(TRACE_EXIT, "%s: %p", __func__, maptable);
+ return maptable;
+}
+
+void mappingtable_close(OSyncMappingTable *maptable)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, maptable);
+ osengine_mappingtable_close(maptable);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+void check_mapping(OSyncMappingTable *maptable, int memberid, int mappingid, int numentries, const char *uid, const char *format, const char *objecttype)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %i, %i, %i, %s, %s, %s)", __func__, maptable, memberid, mappingid, numentries, uid, format, objecttype);
+ OSyncMapping *mapping = NULL;
+ mark_point();
+ OSyncMember *member = osync_member_from_id(maptable->group, memberid);
+ OSyncMappingView *view = osengine_mappingtable_find_view(maptable, member);
+ mark_point();
+ if (mappingid != -1) {
+ mapping = g_list_nth_data(maptable->mappings, mappingid);
+ } else {
+ GList *m;
+ for (m = maptable->mappings; m; m = m->next) {
+ mapping = m->data;
+ OSyncMappingEntry *entry = osengine_mapping_find_entry(mapping, NULL, view);
+ if (!entry)
+ continue;
+ OSyncChange *change = entry->change;
+ fail_unless(change != NULL, NULL);
+ if (!strcmp(osync_change_get_uid(change), uid))
+ break;
+ }
+ }
+ fail_unless(mapping != NULL, NULL);
+ fail_unless(osengine_mapping_num_changes(mapping) == numentries, "osengine_mapping_num_changes(mapping) == numentries for %s, %i: %i != %i", uid, memberid, osengine_mapping_num_changes(mapping), numentries);
+ mark_point();
+
+
+ OSyncChange *change = osengine_mapping_find_entry(mapping, NULL, view)->change;
+ fail_unless(change != NULL, NULL);
+ if (format)
+ fail_unless(!strcmp(osync_objformat_get_name(osync_change_get_objformat(change)), format), NULL);
+ if (objecttype)
+ fail_unless(!strcmp(osync_objtype_get_name(osync_change_get_objtype(change)), objecttype), NULL);
+ if (uid && strcmp(osync_change_get_uid(change), uid)) {
+ printf("uid mismatch: %s != %s for member %i and mapping %i\n", osync_change_get_uid(change), uid, memberid, mappingid);
+ fail("uid mismatch");
+ }
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+OSyncHashTable *hashtable_load(OSyncGroup *group, int memberid, int entries)
+{
+ mark_point();
+ OSyncMember *member = osync_member_from_id(group, memberid);
+ mark_point();
+ OSyncHashTable *table = osync_hashtable_new();
+ mark_point();
+ fail_unless(osync_hashtable_load(table, member, NULL), NULL);
+ mark_point();
+ fail_unless(osync_hashtable_num_entries(table) == entries, NULL);
+ return table;
+}
+
+void check_hash(OSyncHashTable *table, const char *cmpuid)
+{
+ char *uid = NULL;
+ char *hash = NULL;
+ int i;
+ osync_bool found = FALSE;
+ for (i = 0; i < osync_hashtable_num_entries(table); i++) {
+ osync_hashtable_nth_entry(table, i, &uid, &hash);
+ if (!strcmp(cmpuid, uid))
+ found = TRUE;
+ }
+ fail_unless(found == TRUE, NULL);
+}
+
+static void load_format(OSyncEnv *env, const char *name)
+{
+ OSyncError *error = NULL;
+ char *path = g_strdup_printf("%s/%s", g_get_current_dir(), name);
+ fail_unless(osync_module_load(env, path, &error), NULL);
+ g_free(path);
+}
+
+OSyncEnv *init_env(void)
+{
+ mark_point();
+ OSyncEnv *osync = osync_env_new();
+ mark_point();
+ osync_env_set_option(osync, "LOAD_GROUPS", "FALSE");
+ osync_env_set_option(osync, "LOAD_FORMATS", "FALSE");
+ osync_env_set_option(osync, "LOAD_PLUGINS", "FALSE");
+ mark_point();
+ OSyncError *error = NULL;
+ fail_unless(osync_env_initialize(osync, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ char *path = g_strdup_printf("%s/%s", g_get_current_dir(), "mock_sync.so");
+ fail_unless(osync_module_load(osync, path, &error), NULL);
+ g_free(path);
+
+ load_format(osync, "contact.so");
+ load_format(osync, "data.so");
+ load_format(osync, "event.so");
+ load_format(osync, "note.so");
+ load_format(osync, "todo.so");
+ load_format(osync, "xml-vcal.so");
+ load_format(osync, "xml-vcard.so");
+ load_format(osync, "xml-vnote.so");
+ load_format(osync, "xml-evolution.so");
+ load_format(osync, "xml-kde.so");
+ load_format(osync, "mockformat.so");
+
+ return osync;
+}
+
+OSyncEnv *init_env_none(void)
+{
+ mark_point();
+ OSyncEnv *osync = osync_env_new();
+ mark_point();
+ osync_env_set_option(osync, "LOAD_GROUPS", "FALSE");
+ osync_env_set_option(osync, "LOAD_FORMATS", "FALSE");
+ osync_env_set_option(osync, "LOAD_PLUGINS", "FALSE");
+ mark_point();
+ OSyncError *error = NULL;
+ fail_unless(osync_env_initialize(osync, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+ return osync;
+}
diff --git a/debian/opensync/opensync-0.22/tests/support.h b/debian/opensync/opensync-0.22/tests/support.h
new file mode 100644
index 00000000..9ccee451
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/support.h
@@ -0,0 +1,78 @@
+#ifndef SUPPORT_H
+#define SUPPORT_H
+
+#include <check.h>
+
+#ifndef CHECK_VERSION
+#define CHECK_VERSION (CHECK_MAJOR_VERSION * 10000 + CHECK_MINOR_VERSION * 100 + CHECK_MICRO_VERSION)
+#endif /*CHECK_VERSION*/
+
+#include <opensync/opensync.h>
+#include <opensync/opensync_internals.h>
+#include "engine.h"
+#include "engine_internals.h"
+
+char *setup_testbed(char *fkt_name);
+void destroy_testbed(char *path);
+
+int num_conflicts;
+int num_written;
+int num_read;
+int num_connected;
+int num_disconnected;
+int num_read_info;
+
+int num_member_connect_errors;
+int num_member_sent_changes;
+int num_member_get_changes_errors;
+int num_member_sync_done_errors;
+int num_member_disconnect_errors;
+int num_member_comitted_all_errors;
+int num_member_comitted_all;
+
+int num_written_errors;
+int num_mapping_errors;
+int num_recv_errors;
+
+int num_engine_errors;
+int num_engine_successfull;
+int num_engine_prev_unclean;
+int num_engine_end_conflicts;
+int num_engine_connected;
+int num_engine_read;
+int num_engine_wrote;
+int num_engine_disconnected;
+
+void conflict_handler_choose_first(OSyncEngine *engine, OSyncMapping *mapping, void *user_data);
+void conflict_handler_choose_modified(OSyncEngine *engine, OSyncMapping *mapping, void *user_data);
+void conflict_handler_choose_deleted(OSyncEngine *engine, OSyncMapping *mapping, void *user_data);
+void conflict_handler_duplication(OSyncEngine *engine, OSyncMapping *mapping, void *user_data);
+void conflict_handler_delay(OSyncEngine *engine, OSyncMapping *mapping, void *user_data);
+void conflict_handler_ignore(OSyncEngine *engine, OSyncMapping *mapping, void *user_data);
+
+void entry_status(OSyncEngine *engine, OSyncChangeUpdate *status, void *user_data);
+void member_status(OSyncMemberUpdate *status, void *user_data);
+void engine_status(OSyncEngine *engine, OSyncEngineUpdate *status, void *user_data);
+void mapping_status(OSyncMappingUpdate *status, void *user_data);
+
+OSyncEngine *init_engine(OSyncGroup *group);
+void conflict_handler_random(OSyncEngine *engine, OSyncMapping *mapping, void *user_data);
+osync_bool synchronize_once(OSyncEngine *engine, OSyncError **error);
+
+/*needed because of an incompatible API change in 0.94*/
+#if CHECK_VERSION <= 903
+void create_case(Suite *s, const char *name, void (*function)(void));
+#else /*CHECK_VERSION > 903*/
+void create_case(Suite *s, const char *name, void (*function)(int));
+#endif /*CHECK_VERSION*/
+
+OSyncMappingTable *mappingtable_load(OSyncGroup *group, int num_mappings, int num_unmapped);
+void mappingtable_close(OSyncMappingTable *maptable);
+
+OSyncHashTable *hashtable_load(OSyncGroup *group, int member, int entries);
+void check_hash(OSyncHashTable *table, const char *cmpuid);
+void check_mapping(OSyncMappingTable *table, int memberid, int mappingid, int numentries, const char *uid, const char *format, const char *objecttype);
+OSyncEnv *init_env(void);
+OSyncEnv *init_env_none(void);
+
+#endif /*SUPPORT_H*/