aboutsummaryrefslogtreecommitdiffstats
path: root/test/meson.build
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-04-05 07:01:18 -0400
committerDavid Robillard <d@drobilla.net>2023-12-02 18:49:08 -0500
commit3cc5a4fcaea8f1e2fd47c53135b53f8edcb8619d (patch)
tree4496d7af98b1033630d992db1b8788077ebda8f6 /test/meson.build
parent89acd9d099bd46c1cbf17ee3a7bb78610a8138fe (diff)
downloadserd-3cc5a4fcaea8f1e2fd47c53135b53f8edcb8619d.tar.gz
serd-3cc5a4fcaea8f1e2fd47c53135b53f8edcb8619d.tar.bz2
serd-3cc5a4fcaea8f1e2fd47c53135b53f8edcb8619d.zip
Factor out and rewrite command-line interface
Diffstat (limited to 'test/meson.build')
-rw-r--r--test/meson.build43
1 files changed, 33 insertions, 10 deletions
diff --git a/test/meson.build b/test/meson.build
index 0e887ccb..43fc7211 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -181,32 +181,27 @@ simple_command_tests = {
'bad': [
['-B', 'nonuriorpath'],
['-B'],
- ['-I', 'turtle'],
['-I', 'unknown'],
['-I'],
['-O', 'unknown'],
['-O'],
+ ['-R'],
['-b', '-1'],
['-b', '1024junk'],
- ['-b', '9223372036854775807'],
['-b'],
- ['-k', '-1'],
- ['-k', '1024junk'],
['-k', '9223372036854775807'],
['-k'],
['-qi'],
- ['-r'],
['-s', '<foo> a <Bar> .'],
['-s'],
- ['-w'],
['-z'],
],
'good': [
['--help'],
['--version'],
+ ['-V'],
['-h'],
['-k', '512', '-s', '<go:>a<go:> .'],
- ['-v'],
],
},
}
@@ -236,17 +231,30 @@ if is_variable('serd_pipe')
endforeach
endforeach
- test('none', serd_pipe, env: test_env, should_fail: true, suite: cmd_suite)
-
# Base URI options
test(
+ 'bad_rebase',
+ serd_pipe,
+ args: ['-B', 'rebase', serd_ttl],
+ env: test_env,
+ should_fail: true,
+ suite: cmd_suite,
+ )
+ test(
'base',
files('test_base.py'),
args: pipe_script_args,
env: test_env,
suite: cmd_suite,
)
+ test(
+ 'dir_base',
+ serd_pipe,
+ args: ['-B', serd_src_root / '', serd_ttl],
+ env: test_env,
+ suite: cmd_suite,
+ )
# Log
@@ -286,6 +294,21 @@ if is_variable('serd_pipe')
input_suite = ['tools', 'pipe', 'input']
+ good_input_tests = {
+ 'unknown_extension': [files('trig_unknown_extension.n3')],
+ 'no_extension': [files('trig_no_extension')],
+ }
+
+ foreach name, args : good_input_tests
+ test(
+ name,
+ serd_pipe,
+ args: args,
+ env: test_env,
+ suite: input_suite,
+ )
+ endforeach
+
bad_input_tests = {
'string': ['-s', '<foo> a <Bar> .'],
'no_such_file': ['no_such_file'],
@@ -513,7 +536,7 @@ test_suites = {
files('extra/root/manifest.ttl'),
ns_serdtest + 'root/',
'--',
- ['-r', 'http://example.org/top/root/'],
+ ['-R', 'http://example.org/top/root/'],
],
'terse': [
files('extra/terse/manifest.ttl'),