diff options
author | JF Bastien <jfb@chromium.org> | 2016-01-20 17:53:29 -0800 |
---|---|---|
committer | JF Bastien <jfb@chromium.org> | 2016-01-20 17:53:29 -0800 |
commit | 41952a28f66f63c19520b445aa5ef30da7bf9efd (patch) | |
tree | 66ce14a6798e273c1fcc1c771778b7213470fc36 | |
parent | 4e7c814b4d37cbb1bffcb205f19ab2167ce6815d (diff) | |
download | binaryen-41952a28f66f63c19520b445aa5ef30da7bf9efd.tar.gz binaryen-41952a28f66f63c19520b445aa5ef30da7bf9efd.tar.bz2 binaryen-41952a28f66f63c19520b445aa5ef30da7bf9efd.zip |
Add --help test.
-rwxr-xr-x | check.py | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -153,6 +153,22 @@ if not has_vanilla_emcc: # tests +print '[ checking --help is useful... ]\n' + +not_executable_suffix = ['.txt', '.js'] +executables = sorted(filter(lambda x: not any(x.endswith(s) for s in + not_executable_suffix), + os.listdir('bin'))) +for e in executables: + print '.. %s --help' % e + out, err = subprocess.Popen([os.path.join('bin', e), '--help'], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE).communicate() + assert len(out) == 0, 'Expected no stdout, got:\n%s' % out + assert e in err, 'Expected help to contain program name, got:\n%s' % err + assert len(err.split('\n')) > 8, 'Expected some help, got:\n%s' % err +os.sys.exit(0) + print '[ checking asm2wasm testcases... ]\n' for asm in tests: |