diff --git a/meson.build b/meson.build index b105335..6f996c9 100644 --- a/meson.build +++ b/meson.build @@ -105,7 +105,7 @@ f00bar = executable( install: true, install_rpath: '$ORIGIN/../' + get_option('libdir') + '/f00bar') -test('f00bar-is-executable', f00bar, args: ['--version']) +subdir('test') install_headers( 'color.h', diff --git a/test/meson.build b/test/meson.build new file mode 100644 index 0000000..c77fd0d --- /dev/null +++ b/test/meson.build @@ -0,0 +1,9 @@ +test('is-executable', f00bar, args: ['--version']) + +pwd = meson.current_source_dir() + +# Configuratoin validation tests +test('no-config', f00bar, args: ['-c', 'xyz'], should_fail: true) +test('config-isnt-file', f00bar, args: ['-c', '.'], should_fail: true) +test('config-no-bar', f00bar, args: ['-c', join_paths(pwd, 'no-bar.yml')], + should_fail: true) diff --git a/test/no-bar.yml b/test/no-bar.yml new file mode 100644 index 0000000..95e1486 --- /dev/null +++ b/test/no-bar.yml @@ -0,0 +1,3 @@ +top-level-isnt-bar: + hello: world +