diff options
Diffstat (limited to 'test/test_grep.py')
-rwxr-xr-x | test/test_grep.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/test/test_grep.py b/test/test_grep.py index 0c8c5228..44c3ce1f 100755 --- a/test/test_grep.py +++ b/test/test_grep.py @@ -21,7 +21,7 @@ DOCUMENTS = { parser = argparse.ArgumentParser(description=__doc__) -parser.add_argument("--serdi", default="./serdi", help="path to serdi") +parser.add_argument("--tool", default="tools/serd-filter", help="executable") parser.add_argument("--wrapper", default="", help="executable wrapper") args = parser.parse_args(sys.argv[1:]) @@ -29,21 +29,20 @@ args = parser.parse_args(sys.argv[1:]) def check_pattern(syntax, pattern, result): command = shlex.split(args.wrapper) + [ - args.serdi, - "-i", + args.tool, + "-I", syntax, - "-G", pattern, - "-s", - DOCUMENTS[syntax], + "-", ] with tempfile.TemporaryFile() as out: proc = subprocess.run( command, + capture_output=True, check=False, encoding="utf-8", - capture_output=True, + input=DOCUMENTS[syntax], ) assert proc.returncode == 0 |