diff options
Diffstat (limited to 'test/meson.build')
-rw-r--r-- | test/meson.build | 76 |
1 files changed, 74 insertions, 2 deletions
diff --git a/test/meson.build b/test/meson.build index 6ca0e38b..8e0688f6 100644 --- a/test/meson.build +++ b/test/meson.build @@ -23,6 +23,7 @@ simple_script_paths = [ 'test_multifile.py', 'test_patterns.py', 'test_quiet.py', + 'test_sort.py', 'test_stdin.py', 'test_write_error.py', ] @@ -129,10 +130,12 @@ subdir('headers') unit_tests = [ 'canon', 'caret', + 'cursor', 'env', 'filter', 'free_null', 'log', + 'model', 'node', 'node_syntax', 'nodes', @@ -227,6 +230,18 @@ simple_command_tests = { ['-k', '512', '-s', '<go:>a<go:> .'], ], }, + 'sort': { + 'bad': [ + ['-c', 'CHAOS'], + ['-c'], + ['-z'], + ['/no/such/file'], + ], + 'good': [ + ['-V'], + ['-h'], + ], + }, } foreach tool, tests : simple_command_tests @@ -441,7 +456,7 @@ if is_variable('serd_filter') # Command line options test( - 'garbage_pattern', + 'bad_pattern', tool, args: ['junk', serd_ttl], env: test_env, @@ -489,6 +504,34 @@ if is_variable('serd_filter') subdir('extra/filter') endif +# Tests specific to serd-sort +if is_variable('serd_sort') + sort_script_args = common_script_args + ['--tool', serd_sort] + + test( + 'stdin', + files('test_stdin.py'), + args: sort_script_args, + env: test_env, + suite: ['tools', 'sort', 'input'], + ) + test( + 'missing_output', + serd_sort, + args: ['-o', '/does/not/exist.ttl', serd_ttl], + env: test_env, + should_fail: true, + suite: ['tools', 'sort', 'output'], + ) + test( + 'sort', + files('test_sort.py'), + args: sort_script_args + files('sort/input.trig'), + env: test_env, + suite: ['tools', 'sort'], + ) +endif + ########################### # Data-Driven Test Suites # ########################### @@ -651,7 +694,36 @@ if is_variable('serd_pipe') run_suite, args: pipe_script_args + args, env: test_env, - suite: ['suite'], + suite: ['suite', 'pipe'], + timeout: 240, + ) + endforeach +endif + +# Run model test suites using serd-sort +if is_variable('serd_sort') + sort_suite_names = [ + 'nquads', + 'ntriples', + 'trig', + 'turtle', + + 'good', + 'pattern', + 'perfect_forward', + 'perfect_reverse', + 'qualify', + 'terse', + ] + + foreach name : sort_suite_names + args = test_suites[name] + test( + name, + run_suite, + args: sort_script_args + ['--unique'] + args, + env: test_env, + suite: ['suite', 'sort'], timeout: 240, ) endforeach |