diff options
author | Alon Zakai <azakai@google.com> | 2020-02-18 19:35:29 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-18 19:35:29 -0800 |
commit | 4b79514283d5f6a4fdd058690b78b3bd97e193b0 (patch) | |
tree | 9d6ed3729309182ef6c7aa21e1b7d072a0b9c030 /test/unit/test_parsing_error.py | |
parent | 08cc4d6711702a3f69159a0a4aa6e8ecedb98b5c (diff) | |
download | binaryen-4b79514283d5f6a4fdd058690b78b3bd97e193b0.tar.gz binaryen-4b79514283d5f6a4fdd058690b78b3bd97e193b0.tar.bz2 binaryen-4b79514283d5f6a4fdd058690b78b3bd97e193b0.zip |
Concise error output (#2652)
Don't print the entire module on an error. Instead, just print
the validation errors.
However, if the user passed --print, then do print it, as otherwise
nothing would get printed - the error would be before the pass
to print happens. And in general a user passing in a request
to print would expect a printed module anyhow.
fixes #2634
Diffstat (limited to 'test/unit/test_parsing_error.py')
-rw-r--r-- | test/unit/test_parsing_error.py | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/test/unit/test_parsing_error.py b/test/unit/test_parsing_error.py deleted file mode 100644 index c9128045e..000000000 --- a/test/unit/test_parsing_error.py +++ /dev/null @@ -1,19 +0,0 @@ -import os - -from scripts.test import shared -from . import utils - - -class ParsingErrorTest(utils.BinaryenTestCase): - def test_parsing_error_msg(self): - module = ''' -(module - (func $foo - (abc) - ) -) -''' - p = shared.run_process(shared.WASM_OPT + ['--print', '-o', os.devnull], - input=module, check=False, capture_output=True) - self.assertNotEqual(p.returncode, 0) - self.assertIn("parse exception: abc (at 4:4)", p.stderr) |