diff options
author | David Robillard <d@drobilla.net> | 2019-12-18 19:16:14 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-10-27 13:13:59 +0100 |
commit | a1e6f53715ba7be340d4a59a9878d0ca2c7c6c3f (patch) | |
tree | fe49db88bd8e914580b67f9664af0cce2fdcd3a8 /wscript | |
parent | 7f508b89230b339684a4013dbbad741d9e16e40a (diff) | |
download | serd-a1e6f53715ba7be340d4a59a9878d0ca2c7c6c3f.tar.gz serd-a1e6f53715ba7be340d4a59a9878d0ca2c7c6c3f.tar.bz2 serd-a1e6f53715ba7be340d4a59a9878d0ca2c7c6c3f.zip |
WIP: Add statement filtering
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -172,6 +172,7 @@ lib_source = ['src/base64.c', 'src/cursor.c', 'src/decimal.c', 'src/env.c', + 'src/filter.c', 'src/inserter.c', 'src/int_math.c', 'src/iter.c', @@ -676,6 +677,7 @@ def validation_test_suite(tst, def test(tst): + import subprocess import tempfile # Create test output directories @@ -756,6 +758,18 @@ def test(tst): check.file_equals('%s/tests/multifile/output.nq' % srcdir, 'tests/multifile/output.out.nq') + with tst.group('GrepCommand') as check: + with tempfile.TemporaryFile(mode='w+') as stdout: + cmd = _wrapped_command([ + serdi, + '-g', '?s <urn:example:p> <urn:example:o> .', + '-s', + '<urn:example:s> <urn:example:p> <urn:example:o> .\n' + '<urn:example:s> <urn:example:q> <urn:example:r> .\n']) + check(lambda: subprocess.check_output(cmd).decode('utf-8') == + '<urn:example:s> <urn:example:p> <urn:example:o> .\n', + name='wildcard subject') + with tst.group('BadCommands', expected=1, stderr=autowaf.NONEMPTY) as check: @@ -764,6 +778,7 @@ def test(tst): check([serdi, 'ftp://example.org/unsupported.ttl']) check([serdi, '-I']) check([serdi, '-c']) + check([serdi, '-g']) check([serdi, '-i', 'illegal']) check([serdi, '-i', 'turtle']) check([serdi, '-i']) |