feat: add safe calendar import and export
Add explicit noninteractive CLI transfer modes with full event validation, idempotent duplicate handling, collision refusal, atomic import backups, and no-overwrite export creation. Cover pure merge semantics and end-to-end rollback paths for unsupported content, invalid identities, conflicts, option combinations, and existing destinations.
This commit is contained in:
@@ -13,6 +13,7 @@ project(
|
||||
|
||||
inc = include_directories('include')
|
||||
nocal_sources = files(
|
||||
'src/domain/calendar_transfer.cpp',
|
||||
'src/domain/date.cpp',
|
||||
'src/domain/event_query.cpp',
|
||||
'src/domain/month_layout.cpp',
|
||||
@@ -30,6 +31,10 @@ nocal_executable = executable('nocal', 'src/main.cpp', include_directories: inc,
|
||||
domain_tests = executable('domain-tests', 'tests/domain_tests.cpp',
|
||||
include_directories: inc, link_with: nocal_lib)
|
||||
test('domain', domain_tests)
|
||||
calendar_transfer_tests = executable('calendar-transfer-tests',
|
||||
'tests/calendar_transfer_tests.cpp', include_directories: inc,
|
||||
link_with: nocal_lib)
|
||||
test('calendar-transfer', calendar_transfer_tests)
|
||||
ics_tests = executable('ics-tests', 'tests/ics_tests.cpp',
|
||||
include_directories: inc, link_with: nocal_lib)
|
||||
test('ics-storage', ics_tests)
|
||||
@@ -46,6 +51,8 @@ test('editor', editor_tests)
|
||||
shell = find_program('sh')
|
||||
test('cli-recovery', shell,
|
||||
args: [files('tests/cli_recovery_test.sh'), nocal_executable])
|
||||
test('cli-transfer', shell,
|
||||
args: [files('tests/cli_transfer_test.sh'), nocal_executable])
|
||||
|
||||
install_data('scripts/nocal-hyprland', install_dir: get_option('bindir'),
|
||||
install_mode: 'rwxr-xr-x')
|
||||
|
||||
Reference in New Issue
Block a user