command-handler: rework for new sexp

Rework / cleanup the command-handler (and rename for command-parser).

Update tests (and integrate with sources)
This commit is contained in:
Dirk-Jan C. Binnema
2022-11-07 18:19:53 +02:00
parent dfc2cb12d7
commit dbd3c1309a
8 changed files with 562 additions and 735 deletions

View File

@ -16,14 +16,13 @@
lib_mu_utils=static_library('mu-utils', [
'mu-command-parser.cc',
'mu-command-handler.cc',
'mu-logger.cc',
'mu-option.cc',
'mu-readline.cc',
'mu-sexp.cc',
'mu-test-utils.cc',
'mu-util.c',
'mu-util.h',
'mu-utils.cc'],
dependencies: [
glib_dep,
@ -39,4 +38,19 @@ lib_mu_utils_dep = declare_dependency(
include_directories: include_directories(['.', '..'])
)
#
# tests
#
test('test-sexp',
executable('test-sexp', 'mu-sexp.cc',
install: false,
cpp_args: ['-DBUILD_TESTS'],
dependencies: [glib_dep, lib_mu_utils_dep]))
test('test-command-handler',
executable('test-command-handler', 'mu-command-handler.cc',
install: false,
cpp_args: ['-DBUILD_TESTS'],
dependencies: [glib_dep, lib_mu_utils_dep]))
subdir('tests')