diff options
author | Michael Ferris <mike.ferris@hotmail.com> | 2016-06-08 10:09:25 -0700 |
---|---|---|
committer | Ben Smith <binjimin@gmail.com> | 2016-06-08 10:09:25 -0700 |
commit | 88acd087e8b758f72a60f07e79c6febf37f0b84e (patch) | |
tree | 556b87320af108107078511a2ea3a1f1aa690cb8 /test/spec.js | |
parent | e8f8aa4eddc2e27251690027263b61b9138dbcd7 (diff) | |
download | wabt-88acd087e8b758f72a60f07e79c6febf37f0b84e.tar.gz wabt-88acd087e8b758f72a60f07e79c6febf37f0b84e.tar.bz2 wabt-88acd087e8b758f72a60f07e79c6febf37f0b84e.zip |
Teach test scripts about ch.exe (#87)
Diffstat (limited to 'test/spec.js')
-rw-r--r-- | test/spec.js | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/test/spec.js b/test/spec.js index 68e56332..2b1f9b33 100644 --- a/test/spec.js +++ b/test/spec.js @@ -14,9 +14,19 @@ * limitations under the License. */ -/* polyfill from SM to D8 */ +/* polyfill from SM/CH to D8 */ if (typeof arguments == 'undefined') { - arguments = scriptArgs; + if (typeof scriptArgs != 'undefined') { + arguments = scriptArgs; + } else if(typeof WScript != 'undefined') { + arguments = WScript.Arguments || []; + } +} + +if (typeof quit == 'undefined') { + if (typeof WScript != 'undefined') { + quit = WScript.quit; + } } if (typeof readbuffer == 'undefined') { |