diff options
author | David Robillard <d@drobilla.net> | 2021-04-15 18:34:17 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-01-13 23:03:41 -0500 |
commit | c90c662f85ca1a36794a0404b2101a72de020ca3 (patch) | |
tree | 9e4e8abb5a70e955f0236aa9ebeccdbcba02c33f /test/meson.build | |
parent | f074a83f20e04e360704a190ab5f4e646f4272b7 (diff) | |
download | serd-c90c662f85ca1a36794a0404b2101a72de020ca3.tar.gz serd-c90c662f85ca1a36794a0404b2101a72de020ca3.tar.bz2 serd-c90c662f85ca1a36794a0404b2101a72de020ca3.zip |
Use exess for reading and writing numeric and binary literals
Diffstat (limited to 'test/meson.build')
-rw-r--r-- | test/meson.build | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/test/meson.build b/test/meson.build index a57e2cf2..978bc779 100644 --- a/test/meson.build +++ b/test/meson.build @@ -17,12 +17,20 @@ unit_tests = [ 'writer', ] +test_env = [] +if build_machine.system() == 'windows' and host_machine.system() == 'windows' + # For Windows, we need to add to PATH so that DLLs are found + test_env = ['PATH=@0@;@1@'.format('subprojects' / 'exess', + 'subprojects' / 'rerex')] +endif + foreach unit : unit_tests test(unit, executable('test_@0@'.format(unit), 'test_@0@.c'.format(unit), c_args: c_warnings + platform_args + prog_args, dependencies: serd_dep), + env: test_env, suite: 'unit') endforeach @@ -40,7 +48,7 @@ if get_option('utils') serd_ttl = files('../serd.ttl')[0] - test('serd.ttl', serdi, args: [serd_ttl], suite: 'data') + test('serd.ttl', serdi, args: [serd_ttl], env: test_env, suite: 'data') # Command line options @@ -51,7 +59,7 @@ if get_option('utils') ] foreach args : good_args - test(args[0], serdi, args: args, suite: ['serdi', 'options']) + test(args[0], serdi, args: args, env: test_env, suite: ['serdi', 'options']) endforeach bad_args = [ @@ -78,39 +86,50 @@ if get_option('utils') name = ' '.join(args).underscorify() test(name, serdi, args: args, + env: test_env, should_fail: true, suite: ['serdi', 'options']) endforeach - test('none', serdi, should_fail: true, suite: ['serdi', 'options']) + test('none', + serdi, + env: test_env, + should_fail: true, + suite: ['serdi', 'options']) test('quiet', files('test_quiet.py'), args: script_args + files('bad/bad-base.ttl'), + env: test_env, suite: ['serdi', 'options']) # Inputs test('stdin', files('test_stdin.py'), args: script_args, + env: test_env, suite: ['serdi', 'input']) test('string', serdi, args: ['-s', '<foo> a <Bar> .'], + env: test_env, should_fail: true, suite: ['serdi', 'input']) test('missing', serdi, args: ['-i', 'turtle'], + env: test_env, should_fail: true, suite: ['serdi', 'input']) test('no_such_file', serdi, args: ['no_such_file'], + env: test_env, should_fail: true, suite: ['serdi', 'input']) test('remote', serdi, args: ['ftp://example.org/unsupported.ttl'], + env: test_env, should_fail: true, suite: ['serdi', 'input']) @@ -118,16 +137,19 @@ if get_option('utils') test('read_dir', serdi, args: ['-e', 'file://@0@/'.format(meson.source_root())], + env: test_env, should_fail: true, suite: 'io_errors') test('bulk_read_dir', serdi, args: ['file://@0@/'.format(meson.source_root())], + env: test_env, should_fail: true, suite: 'io_errors') test('write_error', files('test_write_error.py'), args: script_args + [serd_ttl], + env: test_env, suite: 'io_errors') # RDF test suites @@ -143,6 +165,7 @@ if get_option('utils') base_uri = serd_base + name + '/' test(name, run_test_suite, args: script_args + [manifest, base_uri], + env: test_env, suite: ['rdf', 'serd'], timeout: 240) endforeach @@ -154,6 +177,7 @@ if get_option('utils') ### ... once with strict parsing to test the hard errors test('lax.strict', run_test_suite, args: script_args + [lax_manifest, lax_base_uri], + env: test_env, is_parallel: false, suite: ['rdf', 'serd'], timeout: 240) @@ -161,6 +185,7 @@ if get_option('utils') ### ... and once with lax parsing to tolerate them test('lax.lax', run_test_suite, args: script_args + [lax_manifest, lax_base_uri, '--', '-l'], + env: test_env, is_parallel: false, suite: ['rdf', 'serd'], timeout: 240) @@ -182,6 +207,7 @@ if get_option('utils') test(syntax, run_test_suite, args: script_args + args, + env: test_env, suite: ['rdf', 'w3c'], timeout: 240) |