diff --git a/Makefile b/Makefile index 3e9b9610a5..d6f3526cd0 100644 --- a/Makefile +++ b/Makefile @@ -64,7 +64,10 @@ test-browser: node $(BROWSERIFY_CMD) -e test/_browser.js >dist/6to5-test.js rm -rf templates.json tests.json - test -n "`which open`" && open test/browser.html + if [ -n $$BROWSER ]; then $$BROWSER test/browser.html; \ + elif which xdg-open > /dev/null; then xdg-open 'test/browser.html'; \ + elif which gnome-open > /dev/null; then gnome-open 'test/browser.html'; \ + elif which open > /dev/null; then open 'test/browser.html'; fi \ publish: git pull --rebase diff --git a/test/fixtures/transformation/es6-let-scoping/switch-break/exec.js b/test/fixtures/transformation/es6-let-scoping/switch-break/exec.js new file mode 100644 index 0000000000..0e7eb1fb2f --- /dev/null +++ b/test/fixtures/transformation/es6-let-scoping/switch-break/exec.js @@ -0,0 +1,11 @@ +if (true) { + const x = 1; + switch (x) { + case 1: { + function y() { + assert(x, 1); + }; + break; + } + } +}