summaryrefslogtreecommitdiff
path: root/test/unit
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2019-07-31 20:33:26 -0700
committerGitHub <noreply@github.com>2019-07-31 20:33:26 -0700
commit0ec9ddf416de2dc9fc68d574513c52079c7ab238 (patch)
tree9e2d249ec7d43c5d8193875709ed6c73086dce57 /test/unit
parentcbcca4cf42690514c04fce958675dcc05c1e86e3 (diff)
downloadbinaryen-0ec9ddf416de2dc9fc68d574513c52079c7ab238.tar.gz
binaryen-0ec9ddf416de2dc9fc68d574513c52079c7ab238.tar.bz2
binaryen-0ec9ddf416de2dc9fc68d574513c52079c7ab238.zip
Proper Asyncify list name handling (#2275)
The lists are comma separated, but the names can have internal commas since they are human-readable. This adds awareness of bracketing things, so void foo(int, double) is parsed as a single function name, properly. Helps emscripten-core/emscripten#9128
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/input/asyncify-pure.wast3
-rw-r--r--test/unit/test_asyncify.py2
2 files changed, 5 insertions, 0 deletions
diff --git a/test/unit/input/asyncify-pure.wast b/test/unit/input/asyncify-pure.wast
index 27c9da111..961ab9442 100644
--- a/test/unit/input/asyncify-pure.wast
+++ b/test/unit/input/asyncify-pure.wast
@@ -55,5 +55,8 @@
(call $main)
(call $print (i32.const 500))
)
+ ;; interesting escaped name
+ (func $DOS_ReadFile\28unsigned\20short\2c\20unsigned\20char*\2c\20unsigned\20short*\2c\20bool\29 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32)
+ )
)
diff --git a/test/unit/test_asyncify.py b/test/unit/test_asyncify.py
index 3856c262d..f2d7839b6 100644
--- a/test/unit/test_asyncify.py
+++ b/test/unit/test_asyncify.py
@@ -35,6 +35,8 @@ class AsyncifyTest(BinaryenTestCase):
('--pass-arg=asyncify-whitelist@nonexistent', 'nonexistent'),
('--pass-arg=asyncify-blacklist@main', None),
('--pass-arg=asyncify-whitelist@main', None),
+ ('--pass-arg=asyncify-whitelist@main', None),
+ ('--pass-arg=asyncify-whitelist@DOS_ReadFile(unsigned short, unsigned char*, unsigned short*, bool)', None),
]:
print(arg, warning)
err = run_process(WASM_OPT + [self.input_path('asyncify-pure.wast'), '--asyncify', arg], stdout=subprocess.PIPE, stderr=subprocess.PIPE).stderr.strip()