diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-11-19 21:38:22 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-11-19 21:38:22 -0800 |
commit | 9a004a8fa1b29ea7cbf3b27e3007021e57a083bc (patch) | |
tree | d6d6b2e084b64ba2ff6fdee3d70920c5658028bb /tests/runner.py | |
parent | 2f082bce5f10f698aa07f7c14de6b3da7f265bf1 (diff) |
initial work on JS optimizer
Diffstat (limited to 'tests/runner.py')
-rw-r--r-- | tests/runner.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py index d02ce36b..68581409 100644 --- a/tests/runner.py +++ b/tests/runner.py @@ -4460,6 +4460,12 @@ TT = %s output = Popen([COFFEESCRIPT, VARIABLE_ELIMINATOR], stdin=PIPE, stdout=PIPE).communicate(input)[0] self.assertIdentical(expected, output) + def test_js_optimizer(self): + input = open(path_from_root('tools', 'test-js-optimizer.js')).read() + expected = open(path_from_root('tools', 'test-js-optimizer-output.js')).read() + output = Popen([NODE_JS, JS_OPTIMIZER], stdin=PIPE, stdout=PIPE).communicate(input)[0] + self.assertIdentical(expected, output.replace('\n\n', '\n')) + else: # Benchmarks. Run them with argument |benchmark|. To run a specific test, do # |benchmark.test_X|. |