traceur-rb 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +2 -2
- data/lib/js/compile.js +7 -15
- data/lib/traceur.rb +2 -1
- data/lib/traceur/compilation_error.rb +27 -0
- data/lib/traceur/compiler.rb +4 -1
- data/lib/traceur/configuration.rb +1 -1
- data/lib/traceur/node/runner.rb +1 -1
- data/lib/traceur/version.rb +1 -1
- data/spec/examples/syntax_error.js +3 -0
- data/spec/integration/examples_spec.rb +6 -0
- data/vendor/node_modules/traceur/LICENSE +202 -0
- data/vendor/node_modules/traceur/README.md +5 -5
- data/vendor/node_modules/traceur/bin/traceur-runtime.js +1392 -623
- data/vendor/node_modules/traceur/bin/traceur.js +24749 -17990
- data/vendor/node_modules/traceur/node_modules/.bin/semver +2 -2
- data/vendor/node_modules/traceur/node_modules/commander/History.md +222 -0
- data/vendor/node_modules/traceur/node_modules/commander/Readme.md +127 -35
- data/vendor/node_modules/traceur/node_modules/commander/index.js +261 -93
- data/vendor/node_modules/traceur/node_modules/commander/package.json +41 -9
- data/vendor/node_modules/traceur/node_modules/glob/LICENSE +15 -0
- data/vendor/node_modules/traceur/node_modules/glob/README.md +357 -0
- data/vendor/node_modules/traceur/node_modules/glob/common.js +177 -0
- data/vendor/node_modules/traceur/node_modules/glob/glob.js +649 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/.eslintrc +17 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/LICENSE +15 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/README.md +37 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/inflight.js +44 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/node_modules/wrappy/LICENSE +15 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/node_modules/wrappy/README.md +36 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json +34 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/node_modules/wrappy/test/basic.js +51 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/node_modules/wrappy/wrappy.js +33 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/package.json +61 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/test.js +97 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inherits/LICENSE +16 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inherits/README.md +42 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inherits/inherits.js +1 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inherits/inherits_browser.js +23 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inherits/package.json +33 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inherits/test.js +25 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/.npmignore +1 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/.travis.yml +4 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/LICENSE +23 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/README.md +216 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/benchmark.js +15 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/browser.js +1181 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/minimatch.js +845 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore +2 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.travis.yml +3 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md +121 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js +8 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js +191 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore +2 -0
- data/vendor/node_modules/traceur/node_modules/{q-io/node_modules/collections → glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/.travis.yml +0 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile +6 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md +80 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js +5 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js +38 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +73 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js +56 -0
- data/vendor/node_modules/traceur/node_modules/{q-io/node_modules/url2 → glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/.travis.yml +1 -1
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE +18 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown +62 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js +6 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js +13 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json +83 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js +39 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +75 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-comparison.js +32 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-results.txt +1075 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/cases.txt +182 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/dollar.js +9 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/empty-option.js +10 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/generate.sh +24 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/negative-increment.js +15 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/nested.js +16 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/order.js +10 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/pad.js +13 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/same-type.js +7 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/sequence.js +50 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/package.json +60 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/test/basic.js +399 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/test/brace-expand.js +45 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/test/defaults.js +274 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/test/extglob-ending-with-state-char.js +8 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/LICENSE +27 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/README.md +51 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/node_modules/wrappy/LICENSE +15 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/node_modules/wrappy/README.md +36 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/node_modules/wrappy/package.json +34 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/node_modules/wrappy/test/basic.js +51 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js +33 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/once.js +21 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/package.json +42 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/test/once.js +23 -0
- data/vendor/node_modules/traceur/node_modules/glob/package.json +72 -0
- data/vendor/node_modules/traceur/node_modules/glob/sync.js +409 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/.release.json +17 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/CHANGELOG.md +165 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/LICENSE +19 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/README.md +364 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/dist/rsvp.js +1671 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/dist/rsvp.min.js +9 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp.js +66 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp.umd.js +50 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/-internal.js +265 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/all-settled.js +71 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/all.js +15 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/asap.js +109 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/config.js +28 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/defer.js +45 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/enumerator.js +125 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/events.js +201 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/filter.js +120 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/hash-settled.js +124 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/hash.js +94 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/instrument.js +41 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/map.js +99 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/node.js +281 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise-hash.js +51 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise.js +496 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise/all.js +52 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise/race.js +105 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise/reject.js +47 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise/resolve.js +49 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/race.js +15 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/reject.js +16 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/resolve.js +17 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/rethrow.js +46 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/utils.js +39 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/package.json +100 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/README.md +9 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/bower.json +22 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/composer.json +18 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/package.json +52 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/rsvp.amd.js +1607 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/rsvp.js +1566 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/rsvp.min.js +26 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/vertx.js +1 -0
- data/vendor/node_modules/traceur/node_modules/semver/bin/semver +2 -2
- data/vendor/node_modules/traceur/node_modules/semver/package.json +4 -3
- data/vendor/node_modules/traceur/node_modules/semver/semver.browser.js +7 -0
- data/vendor/node_modules/traceur/node_modules/semver/semver.browser.js.gz +0 -0
- data/vendor/node_modules/traceur/node_modules/semver/semver.js +7 -0
- data/vendor/node_modules/traceur/node_modules/semver/semver.min.js +1 -1
- data/vendor/node_modules/traceur/node_modules/semver/semver.min.js.gz +0 -0
- data/vendor/node_modules/traceur/node_modules/semver/test/index.js +8 -4
- data/vendor/node_modules/traceur/node_modules/semver/test/ltr.js +2 -1
- data/vendor/node_modules/traceur/node_modules/source-map-support/.npmignore +1 -0
- data/vendor/node_modules/traceur/node_modules/{q-io/node_modules/mime/LICENSE → source-map-support/LICENSE.md} +7 -5
- data/vendor/node_modules/traceur/node_modules/source-map-support/README.md +165 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/amd-test/browser-source-map-support.js +89 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/amd-test/index.html +6 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/amd-test/require.js +36 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/amd-test/script.coffee +13 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/amd-test/script.js +24 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/amd-test/script.map +10 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/browser-source-map-support.js +89 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/browser-test/index.html +6 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/browser-test/script.coffee +12 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/browser-test/script.js +25 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/browser-test/script.map +10 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/build.js +69 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/header-test/index.html +6 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/header-test/script.coffee +12 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/header-test/script.js +25 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/header-test/script.map +10 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/header-test/server.js +45 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/.npmignore +2 -0
- data/vendor/node_modules/traceur/node_modules/{q-io → source-map-support/node_modules/source-map}/.travis.yml +1 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/CHANGELOG.md +121 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/LICENSE +28 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/Makefile.dryice.js +166 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/README.md +434 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/assert-shim.js +56 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/mini-require.js +152 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/prefix-source-map.jsm +20 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/prefix-utils.jsm +18 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/suffix-browser.js +8 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/suffix-source-map.jsm +6 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/suffix-utils.jsm +21 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/test-prefix.js +8 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/test-suffix.js +3 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map.js +8 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/array-set.js +97 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/base64-vlq.js +144 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/base64.js +42 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/binary-search.js +81 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/source-map-consumer.js +478 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/source-map-generator.js +380 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/source-node.js +371 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/util.js +205 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/node_modules/amdefine/LICENSE +58 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/node_modules/amdefine/README.md +171 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/node_modules/amdefine/amdefine.js +299 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/node_modules/amdefine/intercept.js +36 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/node_modules/amdefine/package.json +37 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/package.json +142 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/run-tests.js +62 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-api.js +26 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-array-set.js +104 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-base64-vlq.js +24 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-base64.js +35 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-binary-search.js +54 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-dog-fooding.js +72 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-source-map-consumer.js +451 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-source-map-generator.js +417 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-source-node.js +365 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/util.js +161 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/package.json +52 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/source-map-support.js +381 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/test.js +359 -0
- data/vendor/node_modules/traceur/package.json +234 -20
- data/vendor/node_modules/traceur/src/node/NodeCompiler.js +78 -0
- data/vendor/node_modules/traceur/src/node/System.js +32 -5
- data/vendor/node_modules/traceur/src/node/api.js +28 -93
- data/vendor/node_modules/traceur/src/node/command.js +84 -19
- data/vendor/node_modules/traceur/src/node/compileAllJsFilesInDir.js +40 -0
- data/vendor/node_modules/traceur/src/node/interpreter.js +11 -8
- data/vendor/node_modules/traceur/src/node/recursiveModuleCompile.js +171 -0
- data/vendor/node_modules/traceur/src/node/require.js +7 -21
- data/vendor/node_modules/traceur/src/node/to-amd-compiler.js +2 -7
- data/vendor/node_modules/traceur/src/node/to-closure-compiler.js +28 -0
- data/vendor/node_modules/traceur/src/node/to-commonjs-compiler.js +3 -7
- data/vendor/node_modules/traceur/src/node/traceur.js +1 -1
- metadata +196 -190
- data/vendor/node_modules/traceur/node_modules/q-io/.npmignore +0 -1
- data/vendor/node_modules/traceur/node_modules/q-io/CHANGES.md +0 -122
- data/vendor/node_modules/traceur/node_modules/q-io/LICENSE +0 -19
- data/vendor/node_modules/traceur/node_modules/q-io/README.md +0 -928
- data/vendor/node_modules/traceur/node_modules/q-io/buffer-stream.js +0 -59
- data/vendor/node_modules/traceur/node_modules/q-io/coverage-report.js +0 -44
- data/vendor/node_modules/traceur/node_modules/q-io/deprecate.js +0 -51
- data/vendor/node_modules/traceur/node_modules/q-io/fs-boot.js +0 -307
- data/vendor/node_modules/traceur/node_modules/q-io/fs-common.js +0 -499
- data/vendor/node_modules/traceur/node_modules/q-io/fs-mock.js +0 -547
- data/vendor/node_modules/traceur/node_modules/q-io/fs-root.js +0 -105
- data/vendor/node_modules/traceur/node_modules/q-io/fs.js +0 -355
- data/vendor/node_modules/traceur/node_modules/q-io/fs2http.js +0 -65
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps.js +0 -152
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/chain.js +0 -24
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/content.js +0 -93
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/cookie.js +0 -154
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/decorators.js +0 -178
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/fs.js +0 -417
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/html.js +0 -58
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/json.js +0 -78
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/negotiate.js +0 -120
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/proxy.js +0 -27
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/redirect.js +0 -209
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/route.js +0 -125
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/status.js +0 -175
- data/vendor/node_modules/traceur/node_modules/q-io/http-cookie.js +0 -75
- data/vendor/node_modules/traceur/node_modules/q-io/http.js +0 -378
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/.npmignore +0 -11
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/CHANGES.md +0 -78
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/LICENSE.md +0 -21
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/README.md +0 -1285
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/collections.js +0 -22
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/dict.js +0 -142
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/fast-map.js +0 -57
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/fast-set.js +0 -183
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/generic-collection.js +0 -261
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/generic-map.js +0 -186
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/generic-order.js +0 -55
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/generic-set.js +0 -59
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/heap.js +0 -236
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/iterator.js +0 -371
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/list.js +0 -435
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/listen/array-changes.js +0 -247
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/listen/map-changes.js +0 -147
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/listen/property-changes.js +0 -448
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/listen/range-changes.js +0 -139
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/lru-map.js +0 -79
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/lru-set.js +0 -142
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/map.js +0 -60
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/multi-map.js +0 -41
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/node_modules/weak-map/package.json +0 -12
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/node_modules/weak-map/sync +0 -7
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/node_modules/weak-map/sync.patch +0 -48
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/node_modules/weak-map/weak-map.js +0 -590
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/package.json +0 -49
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/set.js +0 -173
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/shim-array.js +0 -274
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/shim-function.js +0 -59
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/shim-object.js +0 -538
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/shim-regexp.js +0 -14
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/shim.js +0 -6
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/sorted-array-map.js +0 -49
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/sorted-array-set.js +0 -51
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/sorted-array.js +0 -269
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/sorted-map.js +0 -61
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/sorted-set.js +0 -736
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/tree-log.js +0 -40
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/weak-map.js +0 -1
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/README.md +0 -66
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/mime.js +0 -114
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/package.json +0 -35
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/test.js +0 -84
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/types/mime.types +0 -1588
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/types/node.types +0 -77
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mimeparse/CHANGES +0 -15
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mimeparse/LICENSE +0 -19
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mimeparse/README +0 -96
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mimeparse/lib/mimeparse.js +0 -166
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mimeparse/package.json +0 -43
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/CONTRIBUTING.md +0 -40
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/LICENSE +0 -19
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/README.md +0 -813
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/benchmark/compare-with-callbacks.js +0 -71
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/benchmark/scenarios.js +0 -36
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/package.json +0 -93
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/q.js +0 -1937
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/queue.js +0 -35
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/.gitmodules +0 -6
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/History.md +0 -36
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/Makefile +0 -7
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/Readme.md +0 -38
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/benchmark.js +0 -32
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/examples.js +0 -39
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/index.js +0 -2
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/lib/querystring.js +0 -123
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/package.json +0 -19
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/.gitmodules +0 -3
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/.npmignore +0 -3
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/History.md +0 -128
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/Makefile +0 -53
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/Readme.md +0 -61
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/bin/expresso +0 -856
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/docs/api.html +0 -1080
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/docs/index.html +0 -377
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/docs/index.md +0 -290
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/docs/layout/foot.html +0 -3
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/docs/layout/head.html +0 -42
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/lib/bar.js +0 -4
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/lib/foo.js +0 -16
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/package.json +0 -12
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/assert.test.js +0 -91
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/async.test.js +0 -12
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/bar.test.js +0 -13
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/foo.test.js +0 -14
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/http.test.js +0 -146
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/serial/async.test.js +0 -39
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/serial/http.test.js +0 -48
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/.gitmodules +0 -3
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/History.md +0 -22
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/Makefile +0 -6
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/Readme.md +0 -248
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/examples/runner.js +0 -53
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/index.js +0 -2
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/lib/eql.js +0 -91
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/lib/should.js +0 -548
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/package.json +0 -8
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/test/should.test.js +0 -358
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/test/querystring.test.js +0 -133
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/.npmignore +0 -3
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/LICENSE.md +0 -20
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/README.md +0 -33
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/package.json +0 -37
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/test/url2-spec.js +0 -125
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/url2.js +0 -151
- data/vendor/node_modules/traceur/node_modules/q-io/package.json +0 -51
- data/vendor/node_modules/traceur/node_modules/q-io/reader.js +0 -133
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/boot-directory-spec.js +0 -47
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/contains-spec.js +0 -11
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/fixtures/hello.txt +0 -1
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/issues/1-spec.js +0 -33
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/make-tree-spec.js +0 -92
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/append-spec.js +0 -41
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/copy-tree-spec.js +0 -57
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/fixture/hello.txt +0 -1
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/link-spec.js +0 -70
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/make-tree-spec.js +0 -109
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/merge-spec.js +0 -67
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/move-spec.js +0 -219
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/object-spec.js +0 -20
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/range-spec.js +0 -26
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/read-spec.js +0 -40
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/remove-directory-spec.js +0 -37
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/remove-tree-spec.js +0 -39
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/root-spec.js +0 -32
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/stat-spec.js +0 -26
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/symbolic-link-spec.js +0 -86
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/working-directory-spec.js +0 -31
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/write-spec.js +0 -73
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/range-spec.js +0 -23
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/range-spec.txt +0 -1
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/read-spec.js +0 -22
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/relative-spec.js +0 -25
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/reroot-spec.js +0 -45
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/write-spec.js +0 -38
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/cookie-spec.js +0 -52
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/directory-list-spec.js +0 -86
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/fixtures/01234.txt +0 -1
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/fixtures/1234.txt +0 -1
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/fixtures/5678.txt +0 -0
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/fixtures/9012/3456.txt +0 -0
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/hosts-spec.js +0 -49
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/interpret-range-spec.js +0 -47
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/partial-range-spec.js +0 -186
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/proxy-spec.js +0 -82
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/symbolic-link-spec.js +0 -110
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http/agent-spec.js +0 -96
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http/basic-spec.js +0 -96
- data/vendor/node_modules/traceur/node_modules/q-io/spec/lib/jasmine-promise.js +0 -42
- data/vendor/node_modules/traceur/node_modules/q-io/writer.js +0 -111
- data/vendor/node_modules/traceur/src/node/compile-single-file.js +0 -69
- data/vendor/node_modules/traceur/src/node/compiler.js +0 -116
- data/vendor/node_modules/traceur/src/node/inline-module.js +0 -149
@@ -0,0 +1,54 @@
|
|
1
|
+
/* -*- Mode: js; js-indent-level: 2; -*- */
|
2
|
+
/*
|
3
|
+
* Copyright 2011 Mozilla Foundation and contributors
|
4
|
+
* Licensed under the New BSD license. See LICENSE or:
|
5
|
+
* http://opensource.org/licenses/BSD-3-Clause
|
6
|
+
*/
|
7
|
+
if (typeof define !== 'function') {
|
8
|
+
var define = require('amdefine')(module, require);
|
9
|
+
}
|
10
|
+
define(function (require, exports, module) {
|
11
|
+
|
12
|
+
var binarySearch = require('../../lib/source-map/binary-search');
|
13
|
+
|
14
|
+
function numberCompare(a, b) {
|
15
|
+
return a - b;
|
16
|
+
}
|
17
|
+
|
18
|
+
exports['test too high'] = function (assert, util) {
|
19
|
+
var needle = 30;
|
20
|
+
var haystack = [2,4,6,8,10,12,14,16,18,20];
|
21
|
+
|
22
|
+
assert.doesNotThrow(function () {
|
23
|
+
binarySearch.search(needle, haystack, numberCompare);
|
24
|
+
});
|
25
|
+
|
26
|
+
assert.equal(binarySearch.search(needle, haystack, numberCompare), 20);
|
27
|
+
};
|
28
|
+
|
29
|
+
exports['test too low'] = function (assert, util) {
|
30
|
+
var needle = 1;
|
31
|
+
var haystack = [2,4,6,8,10,12,14,16,18,20];
|
32
|
+
|
33
|
+
assert.doesNotThrow(function () {
|
34
|
+
binarySearch.search(needle, haystack, numberCompare);
|
35
|
+
});
|
36
|
+
|
37
|
+
assert.equal(binarySearch.search(needle, haystack, numberCompare), null);
|
38
|
+
};
|
39
|
+
|
40
|
+
exports['test exact search'] = function (assert, util) {
|
41
|
+
var needle = 4;
|
42
|
+
var haystack = [2,4,6,8,10,12,14,16,18,20];
|
43
|
+
|
44
|
+
assert.equal(binarySearch.search(needle, haystack, numberCompare), 4);
|
45
|
+
};
|
46
|
+
|
47
|
+
exports['test fuzzy search'] = function (assert, util) {
|
48
|
+
var needle = 19;
|
49
|
+
var haystack = [2,4,6,8,10,12,14,16,18,20];
|
50
|
+
|
51
|
+
assert.equal(binarySearch.search(needle, haystack, numberCompare), 18);
|
52
|
+
};
|
53
|
+
|
54
|
+
});
|
@@ -0,0 +1,72 @@
|
|
1
|
+
/* -*- Mode: js; js-indent-level: 2; -*- */
|
2
|
+
/*
|
3
|
+
* Copyright 2011 Mozilla Foundation and contributors
|
4
|
+
* Licensed under the New BSD license. See LICENSE or:
|
5
|
+
* http://opensource.org/licenses/BSD-3-Clause
|
6
|
+
*/
|
7
|
+
if (typeof define !== 'function') {
|
8
|
+
var define = require('amdefine')(module, require);
|
9
|
+
}
|
10
|
+
define(function (require, exports, module) {
|
11
|
+
|
12
|
+
var SourceMapConsumer = require('../../lib/source-map/source-map-consumer').SourceMapConsumer;
|
13
|
+
var SourceMapGenerator = require('../../lib/source-map/source-map-generator').SourceMapGenerator;
|
14
|
+
|
15
|
+
exports['test eating our own dog food'] = function (assert, util) {
|
16
|
+
var smg = new SourceMapGenerator({
|
17
|
+
file: 'testing.js',
|
18
|
+
sourceRoot: '/wu/tang'
|
19
|
+
});
|
20
|
+
|
21
|
+
smg.addMapping({
|
22
|
+
source: 'gza.coffee',
|
23
|
+
original: { line: 1, column: 0 },
|
24
|
+
generated: { line: 2, column: 2 }
|
25
|
+
});
|
26
|
+
|
27
|
+
smg.addMapping({
|
28
|
+
source: 'gza.coffee',
|
29
|
+
original: { line: 2, column: 0 },
|
30
|
+
generated: { line: 3, column: 2 }
|
31
|
+
});
|
32
|
+
|
33
|
+
smg.addMapping({
|
34
|
+
source: 'gza.coffee',
|
35
|
+
original: { line: 3, column: 0 },
|
36
|
+
generated: { line: 4, column: 2 }
|
37
|
+
});
|
38
|
+
|
39
|
+
smg.addMapping({
|
40
|
+
source: 'gza.coffee',
|
41
|
+
original: { line: 4, column: 0 },
|
42
|
+
generated: { line: 5, column: 2 }
|
43
|
+
});
|
44
|
+
|
45
|
+
var smc = new SourceMapConsumer(smg.toString());
|
46
|
+
|
47
|
+
// Exact
|
48
|
+
util.assertMapping(2, 2, '/wu/tang/gza.coffee', 1, 0, null, smc, assert);
|
49
|
+
util.assertMapping(3, 2, '/wu/tang/gza.coffee', 2, 0, null, smc, assert);
|
50
|
+
util.assertMapping(4, 2, '/wu/tang/gza.coffee', 3, 0, null, smc, assert);
|
51
|
+
util.assertMapping(5, 2, '/wu/tang/gza.coffee', 4, 0, null, smc, assert);
|
52
|
+
|
53
|
+
// Fuzzy
|
54
|
+
|
55
|
+
// Original to generated
|
56
|
+
util.assertMapping(2, 0, null, null, null, null, smc, assert, true);
|
57
|
+
util.assertMapping(2, 9, '/wu/tang/gza.coffee', 1, 0, null, smc, assert, true);
|
58
|
+
util.assertMapping(3, 0, '/wu/tang/gza.coffee', 1, 0, null, smc, assert, true);
|
59
|
+
util.assertMapping(3, 9, '/wu/tang/gza.coffee', 2, 0, null, smc, assert, true);
|
60
|
+
util.assertMapping(4, 0, '/wu/tang/gza.coffee', 2, 0, null, smc, assert, true);
|
61
|
+
util.assertMapping(4, 9, '/wu/tang/gza.coffee', 3, 0, null, smc, assert, true);
|
62
|
+
util.assertMapping(5, 0, '/wu/tang/gza.coffee', 3, 0, null, smc, assert, true);
|
63
|
+
util.assertMapping(5, 9, '/wu/tang/gza.coffee', 4, 0, null, smc, assert, true);
|
64
|
+
|
65
|
+
// Generated to original
|
66
|
+
util.assertMapping(2, 2, '/wu/tang/gza.coffee', 1, 1, null, smc, assert, null, true);
|
67
|
+
util.assertMapping(3, 2, '/wu/tang/gza.coffee', 2, 3, null, smc, assert, null, true);
|
68
|
+
util.assertMapping(4, 2, '/wu/tang/gza.coffee', 3, 6, null, smc, assert, null, true);
|
69
|
+
util.assertMapping(5, 2, '/wu/tang/gza.coffee', 4, 9, null, smc, assert, null, true);
|
70
|
+
};
|
71
|
+
|
72
|
+
});
|
@@ -0,0 +1,451 @@
|
|
1
|
+
/* -*- Mode: js; js-indent-level: 2; -*- */
|
2
|
+
/*
|
3
|
+
* Copyright 2011 Mozilla Foundation and contributors
|
4
|
+
* Licensed under the New BSD license. See LICENSE or:
|
5
|
+
* http://opensource.org/licenses/BSD-3-Clause
|
6
|
+
*/
|
7
|
+
if (typeof define !== 'function') {
|
8
|
+
var define = require('amdefine')(module, require);
|
9
|
+
}
|
10
|
+
define(function (require, exports, module) {
|
11
|
+
|
12
|
+
var SourceMapConsumer = require('../../lib/source-map/source-map-consumer').SourceMapConsumer;
|
13
|
+
var SourceMapGenerator = require('../../lib/source-map/source-map-generator').SourceMapGenerator;
|
14
|
+
|
15
|
+
exports['test that we can instantiate with a string or an objects'] = function (assert, util) {
|
16
|
+
assert.doesNotThrow(function () {
|
17
|
+
var map = new SourceMapConsumer(util.testMap);
|
18
|
+
});
|
19
|
+
assert.doesNotThrow(function () {
|
20
|
+
var map = new SourceMapConsumer(JSON.stringify(util.testMap));
|
21
|
+
});
|
22
|
+
};
|
23
|
+
|
24
|
+
exports['test that the `sources` field has the original sources'] = function (assert, util) {
|
25
|
+
var map = new SourceMapConsumer(util.testMap);
|
26
|
+
var sources = map.sources;
|
27
|
+
|
28
|
+
assert.equal(sources[0], '/the/root/one.js');
|
29
|
+
assert.equal(sources[1], '/the/root/two.js');
|
30
|
+
assert.equal(sources.length, 2);
|
31
|
+
};
|
32
|
+
|
33
|
+
exports['test that the source root is reflected in a mapping\'s source field'] = function (assert, util) {
|
34
|
+
var map = new SourceMapConsumer(util.testMap);
|
35
|
+
var mapping;
|
36
|
+
|
37
|
+
mapping = map.originalPositionFor({
|
38
|
+
line: 2,
|
39
|
+
column: 1
|
40
|
+
});
|
41
|
+
assert.equal(mapping.source, '/the/root/two.js');
|
42
|
+
|
43
|
+
mapping = map.originalPositionFor({
|
44
|
+
line: 1,
|
45
|
+
column: 1
|
46
|
+
});
|
47
|
+
assert.equal(mapping.source, '/the/root/one.js');
|
48
|
+
};
|
49
|
+
|
50
|
+
exports['test mapping tokens back exactly'] = function (assert, util) {
|
51
|
+
var map = new SourceMapConsumer(util.testMap);
|
52
|
+
|
53
|
+
util.assertMapping(1, 1, '/the/root/one.js', 1, 1, null, map, assert);
|
54
|
+
util.assertMapping(1, 5, '/the/root/one.js', 1, 5, null, map, assert);
|
55
|
+
util.assertMapping(1, 9, '/the/root/one.js', 1, 11, null, map, assert);
|
56
|
+
util.assertMapping(1, 18, '/the/root/one.js', 1, 21, 'bar', map, assert);
|
57
|
+
util.assertMapping(1, 21, '/the/root/one.js', 2, 3, null, map, assert);
|
58
|
+
util.assertMapping(1, 28, '/the/root/one.js', 2, 10, 'baz', map, assert);
|
59
|
+
util.assertMapping(1, 32, '/the/root/one.js', 2, 14, 'bar', map, assert);
|
60
|
+
|
61
|
+
util.assertMapping(2, 1, '/the/root/two.js', 1, 1, null, map, assert);
|
62
|
+
util.assertMapping(2, 5, '/the/root/two.js', 1, 5, null, map, assert);
|
63
|
+
util.assertMapping(2, 9, '/the/root/two.js', 1, 11, null, map, assert);
|
64
|
+
util.assertMapping(2, 18, '/the/root/two.js', 1, 21, 'n', map, assert);
|
65
|
+
util.assertMapping(2, 21, '/the/root/two.js', 2, 3, null, map, assert);
|
66
|
+
util.assertMapping(2, 28, '/the/root/two.js', 2, 10, 'n', map, assert);
|
67
|
+
};
|
68
|
+
|
69
|
+
exports['test mapping tokens fuzzy'] = function (assert, util) {
|
70
|
+
var map = new SourceMapConsumer(util.testMap);
|
71
|
+
|
72
|
+
// Finding original positions
|
73
|
+
util.assertMapping(1, 20, '/the/root/one.js', 1, 21, 'bar', map, assert, true);
|
74
|
+
util.assertMapping(1, 30, '/the/root/one.js', 2, 10, 'baz', map, assert, true);
|
75
|
+
util.assertMapping(2, 12, '/the/root/two.js', 1, 11, null, map, assert, true);
|
76
|
+
|
77
|
+
// Finding generated positions
|
78
|
+
util.assertMapping(1, 18, '/the/root/one.js', 1, 22, 'bar', map, assert, null, true);
|
79
|
+
util.assertMapping(1, 28, '/the/root/one.js', 2, 13, 'baz', map, assert, null, true);
|
80
|
+
util.assertMapping(2, 9, '/the/root/two.js', 1, 16, null, map, assert, null, true);
|
81
|
+
};
|
82
|
+
|
83
|
+
exports['test creating source map consumers with )]}\' prefix'] = function (assert, util) {
|
84
|
+
assert.doesNotThrow(function () {
|
85
|
+
var map = new SourceMapConsumer(")]}'" + JSON.stringify(util.testMap));
|
86
|
+
});
|
87
|
+
};
|
88
|
+
|
89
|
+
exports['test eachMapping'] = function (assert, util) {
|
90
|
+
var map = new SourceMapConsumer(util.testMap);
|
91
|
+
var previousLine = -Infinity;
|
92
|
+
var previousColumn = -Infinity;
|
93
|
+
map.eachMapping(function (mapping) {
|
94
|
+
assert.ok(mapping.generatedLine >= previousLine);
|
95
|
+
|
96
|
+
if (mapping.source) {
|
97
|
+
assert.equal(mapping.source.indexOf(util.testMap.sourceRoot), 0);
|
98
|
+
}
|
99
|
+
|
100
|
+
if (mapping.generatedLine === previousLine) {
|
101
|
+
assert.ok(mapping.generatedColumn >= previousColumn);
|
102
|
+
previousColumn = mapping.generatedColumn;
|
103
|
+
}
|
104
|
+
else {
|
105
|
+
previousLine = mapping.generatedLine;
|
106
|
+
previousColumn = -Infinity;
|
107
|
+
}
|
108
|
+
});
|
109
|
+
};
|
110
|
+
|
111
|
+
exports['test iterating over mappings in a different order'] = function (assert, util) {
|
112
|
+
var map = new SourceMapConsumer(util.testMap);
|
113
|
+
var previousLine = -Infinity;
|
114
|
+
var previousColumn = -Infinity;
|
115
|
+
var previousSource = "";
|
116
|
+
map.eachMapping(function (mapping) {
|
117
|
+
assert.ok(mapping.source >= previousSource);
|
118
|
+
|
119
|
+
if (mapping.source === previousSource) {
|
120
|
+
assert.ok(mapping.originalLine >= previousLine);
|
121
|
+
|
122
|
+
if (mapping.originalLine === previousLine) {
|
123
|
+
assert.ok(mapping.originalColumn >= previousColumn);
|
124
|
+
previousColumn = mapping.originalColumn;
|
125
|
+
}
|
126
|
+
else {
|
127
|
+
previousLine = mapping.originalLine;
|
128
|
+
previousColumn = -Infinity;
|
129
|
+
}
|
130
|
+
}
|
131
|
+
else {
|
132
|
+
previousSource = mapping.source;
|
133
|
+
previousLine = -Infinity;
|
134
|
+
previousColumn = -Infinity;
|
135
|
+
}
|
136
|
+
}, null, SourceMapConsumer.ORIGINAL_ORDER);
|
137
|
+
};
|
138
|
+
|
139
|
+
exports['test that we can set the context for `this` in eachMapping'] = function (assert, util) {
|
140
|
+
var map = new SourceMapConsumer(util.testMap);
|
141
|
+
var context = {};
|
142
|
+
map.eachMapping(function () {
|
143
|
+
assert.equal(this, context);
|
144
|
+
}, context);
|
145
|
+
};
|
146
|
+
|
147
|
+
exports['test that the `sourcesContent` field has the original sources'] = function (assert, util) {
|
148
|
+
var map = new SourceMapConsumer(util.testMapWithSourcesContent);
|
149
|
+
var sourcesContent = map.sourcesContent;
|
150
|
+
|
151
|
+
assert.equal(sourcesContent[0], ' ONE.foo = function (bar) {\n return baz(bar);\n };');
|
152
|
+
assert.equal(sourcesContent[1], ' TWO.inc = function (n) {\n return n + 1;\n };');
|
153
|
+
assert.equal(sourcesContent.length, 2);
|
154
|
+
};
|
155
|
+
|
156
|
+
exports['test that we can get the original sources for the sources'] = function (assert, util) {
|
157
|
+
var map = new SourceMapConsumer(util.testMapWithSourcesContent);
|
158
|
+
var sources = map.sources;
|
159
|
+
|
160
|
+
assert.equal(map.sourceContentFor(sources[0]), ' ONE.foo = function (bar) {\n return baz(bar);\n };');
|
161
|
+
assert.equal(map.sourceContentFor(sources[1]), ' TWO.inc = function (n) {\n return n + 1;\n };');
|
162
|
+
assert.equal(map.sourceContentFor("one.js"), ' ONE.foo = function (bar) {\n return baz(bar);\n };');
|
163
|
+
assert.equal(map.sourceContentFor("two.js"), ' TWO.inc = function (n) {\n return n + 1;\n };');
|
164
|
+
assert.throws(function () {
|
165
|
+
map.sourceContentFor("");
|
166
|
+
}, Error);
|
167
|
+
assert.throws(function () {
|
168
|
+
map.sourceContentFor("/the/root/three.js");
|
169
|
+
}, Error);
|
170
|
+
assert.throws(function () {
|
171
|
+
map.sourceContentFor("three.js");
|
172
|
+
}, Error);
|
173
|
+
};
|
174
|
+
|
175
|
+
exports['test sourceRoot + generatedPositionFor'] = function (assert, util) {
|
176
|
+
var map = new SourceMapGenerator({
|
177
|
+
sourceRoot: 'foo/bar',
|
178
|
+
file: 'baz.js'
|
179
|
+
});
|
180
|
+
map.addMapping({
|
181
|
+
original: { line: 1, column: 1 },
|
182
|
+
generated: { line: 2, column: 2 },
|
183
|
+
source: 'bang.coffee'
|
184
|
+
});
|
185
|
+
map.addMapping({
|
186
|
+
original: { line: 5, column: 5 },
|
187
|
+
generated: { line: 6, column: 6 },
|
188
|
+
source: 'bang.coffee'
|
189
|
+
});
|
190
|
+
map = new SourceMapConsumer(map.toString());
|
191
|
+
|
192
|
+
// Should handle without sourceRoot.
|
193
|
+
var pos = map.generatedPositionFor({
|
194
|
+
line: 1,
|
195
|
+
column: 1,
|
196
|
+
source: 'bang.coffee'
|
197
|
+
});
|
198
|
+
|
199
|
+
assert.equal(pos.line, 2);
|
200
|
+
assert.equal(pos.column, 2);
|
201
|
+
|
202
|
+
// Should handle with sourceRoot.
|
203
|
+
var pos = map.generatedPositionFor({
|
204
|
+
line: 1,
|
205
|
+
column: 1,
|
206
|
+
source: 'foo/bar/bang.coffee'
|
207
|
+
});
|
208
|
+
|
209
|
+
assert.equal(pos.line, 2);
|
210
|
+
assert.equal(pos.column, 2);
|
211
|
+
};
|
212
|
+
|
213
|
+
exports['test sourceRoot + originalPositionFor'] = function (assert, util) {
|
214
|
+
var map = new SourceMapGenerator({
|
215
|
+
sourceRoot: 'foo/bar',
|
216
|
+
file: 'baz.js'
|
217
|
+
});
|
218
|
+
map.addMapping({
|
219
|
+
original: { line: 1, column: 1 },
|
220
|
+
generated: { line: 2, column: 2 },
|
221
|
+
source: 'bang.coffee'
|
222
|
+
});
|
223
|
+
map = new SourceMapConsumer(map.toString());
|
224
|
+
|
225
|
+
var pos = map.originalPositionFor({
|
226
|
+
line: 2,
|
227
|
+
column: 2,
|
228
|
+
});
|
229
|
+
|
230
|
+
// Should always have the prepended source root
|
231
|
+
assert.equal(pos.source, 'foo/bar/bang.coffee');
|
232
|
+
assert.equal(pos.line, 1);
|
233
|
+
assert.equal(pos.column, 1);
|
234
|
+
};
|
235
|
+
|
236
|
+
exports['test github issue #56'] = function (assert, util) {
|
237
|
+
var map = new SourceMapGenerator({
|
238
|
+
sourceRoot: 'http://',
|
239
|
+
file: 'www.example.com/foo.js'
|
240
|
+
});
|
241
|
+
map.addMapping({
|
242
|
+
original: { line: 1, column: 1 },
|
243
|
+
generated: { line: 2, column: 2 },
|
244
|
+
source: 'www.example.com/original.js'
|
245
|
+
});
|
246
|
+
map = new SourceMapConsumer(map.toString());
|
247
|
+
|
248
|
+
var sources = map.sources;
|
249
|
+
assert.equal(sources.length, 1);
|
250
|
+
assert.equal(sources[0], 'http://www.example.com/original.js');
|
251
|
+
};
|
252
|
+
|
253
|
+
exports['test github issue #43'] = function (assert, util) {
|
254
|
+
var map = new SourceMapGenerator({
|
255
|
+
sourceRoot: 'http://example.com',
|
256
|
+
file: 'foo.js'
|
257
|
+
});
|
258
|
+
map.addMapping({
|
259
|
+
original: { line: 1, column: 1 },
|
260
|
+
generated: { line: 2, column: 2 },
|
261
|
+
source: 'http://cdn.example.com/original.js'
|
262
|
+
});
|
263
|
+
map = new SourceMapConsumer(map.toString());
|
264
|
+
|
265
|
+
var sources = map.sources;
|
266
|
+
assert.equal(sources.length, 1,
|
267
|
+
'Should only be one source.');
|
268
|
+
assert.equal(sources[0], 'http://cdn.example.com/original.js',
|
269
|
+
'Should not be joined with the sourceRoot.');
|
270
|
+
};
|
271
|
+
|
272
|
+
exports['test absolute path, but same host sources'] = function (assert, util) {
|
273
|
+
var map = new SourceMapGenerator({
|
274
|
+
sourceRoot: 'http://example.com/foo/bar',
|
275
|
+
file: 'foo.js'
|
276
|
+
});
|
277
|
+
map.addMapping({
|
278
|
+
original: { line: 1, column: 1 },
|
279
|
+
generated: { line: 2, column: 2 },
|
280
|
+
source: '/original.js'
|
281
|
+
});
|
282
|
+
map = new SourceMapConsumer(map.toString());
|
283
|
+
|
284
|
+
var sources = map.sources;
|
285
|
+
assert.equal(sources.length, 1,
|
286
|
+
'Should only be one source.');
|
287
|
+
assert.equal(sources[0], 'http://example.com/original.js',
|
288
|
+
'Source should be relative the host of the source root.');
|
289
|
+
};
|
290
|
+
|
291
|
+
exports['test github issue #64'] = function (assert, util) {
|
292
|
+
var map = new SourceMapConsumer({
|
293
|
+
"version": 3,
|
294
|
+
"file": "foo.js",
|
295
|
+
"sourceRoot": "http://example.com/",
|
296
|
+
"sources": ["/a"],
|
297
|
+
"names": [],
|
298
|
+
"mappings": "AACA",
|
299
|
+
"sourcesContent": ["foo"]
|
300
|
+
});
|
301
|
+
|
302
|
+
assert.equal(map.sourceContentFor("a"), "foo");
|
303
|
+
assert.equal(map.sourceContentFor("/a"), "foo");
|
304
|
+
};
|
305
|
+
|
306
|
+
exports['test bug 885597'] = function (assert, util) {
|
307
|
+
var map = new SourceMapConsumer({
|
308
|
+
"version": 3,
|
309
|
+
"file": "foo.js",
|
310
|
+
"sourceRoot": "file:///Users/AlGore/Invented/The/Internet/",
|
311
|
+
"sources": ["/a"],
|
312
|
+
"names": [],
|
313
|
+
"mappings": "AACA",
|
314
|
+
"sourcesContent": ["foo"]
|
315
|
+
});
|
316
|
+
|
317
|
+
var s = map.sources[0];
|
318
|
+
assert.equal(map.sourceContentFor(s), "foo");
|
319
|
+
};
|
320
|
+
|
321
|
+
exports['test github issue #72, duplicate sources'] = function (assert, util) {
|
322
|
+
var map = new SourceMapConsumer({
|
323
|
+
"version": 3,
|
324
|
+
"file": "foo.js",
|
325
|
+
"sources": ["source1.js", "source1.js", "source3.js"],
|
326
|
+
"names": [],
|
327
|
+
"mappings": ";EAAC;;IAEE;;MEEE",
|
328
|
+
"sourceRoot": "http://example.com"
|
329
|
+
});
|
330
|
+
|
331
|
+
var pos = map.originalPositionFor({
|
332
|
+
line: 2,
|
333
|
+
column: 2
|
334
|
+
});
|
335
|
+
assert.equal(pos.source, 'http://example.com/source1.js');
|
336
|
+
assert.equal(pos.line, 1);
|
337
|
+
assert.equal(pos.column, 1);
|
338
|
+
|
339
|
+
var pos = map.originalPositionFor({
|
340
|
+
line: 4,
|
341
|
+
column: 4
|
342
|
+
});
|
343
|
+
assert.equal(pos.source, 'http://example.com/source1.js');
|
344
|
+
assert.equal(pos.line, 3);
|
345
|
+
assert.equal(pos.column, 3);
|
346
|
+
|
347
|
+
var pos = map.originalPositionFor({
|
348
|
+
line: 6,
|
349
|
+
column: 6
|
350
|
+
});
|
351
|
+
assert.equal(pos.source, 'http://example.com/source3.js');
|
352
|
+
assert.equal(pos.line, 5);
|
353
|
+
assert.equal(pos.column, 5);
|
354
|
+
};
|
355
|
+
|
356
|
+
exports['test github issue #72, duplicate names'] = function (assert, util) {
|
357
|
+
var map = new SourceMapConsumer({
|
358
|
+
"version": 3,
|
359
|
+
"file": "foo.js",
|
360
|
+
"sources": ["source.js"],
|
361
|
+
"names": ["name1", "name1", "name3"],
|
362
|
+
"mappings": ";EAACA;;IAEEA;;MAEEE",
|
363
|
+
"sourceRoot": "http://example.com"
|
364
|
+
});
|
365
|
+
|
366
|
+
var pos = map.originalPositionFor({
|
367
|
+
line: 2,
|
368
|
+
column: 2
|
369
|
+
});
|
370
|
+
assert.equal(pos.name, 'name1');
|
371
|
+
assert.equal(pos.line, 1);
|
372
|
+
assert.equal(pos.column, 1);
|
373
|
+
|
374
|
+
var pos = map.originalPositionFor({
|
375
|
+
line: 4,
|
376
|
+
column: 4
|
377
|
+
});
|
378
|
+
assert.equal(pos.name, 'name1');
|
379
|
+
assert.equal(pos.line, 3);
|
380
|
+
assert.equal(pos.column, 3);
|
381
|
+
|
382
|
+
var pos = map.originalPositionFor({
|
383
|
+
line: 6,
|
384
|
+
column: 6
|
385
|
+
});
|
386
|
+
assert.equal(pos.name, 'name3');
|
387
|
+
assert.equal(pos.line, 5);
|
388
|
+
assert.equal(pos.column, 5);
|
389
|
+
};
|
390
|
+
|
391
|
+
exports['test SourceMapConsumer.fromSourceMap'] = function (assert, util) {
|
392
|
+
var smg = new SourceMapGenerator({
|
393
|
+
sourceRoot: 'http://example.com/',
|
394
|
+
file: 'foo.js'
|
395
|
+
});
|
396
|
+
smg.addMapping({
|
397
|
+
original: { line: 1, column: 1 },
|
398
|
+
generated: { line: 2, column: 2 },
|
399
|
+
source: 'bar.js'
|
400
|
+
});
|
401
|
+
smg.addMapping({
|
402
|
+
original: { line: 2, column: 2 },
|
403
|
+
generated: { line: 4, column: 4 },
|
404
|
+
source: 'baz.js',
|
405
|
+
name: 'dirtMcGirt'
|
406
|
+
});
|
407
|
+
smg.setSourceContent('baz.js', 'baz.js content');
|
408
|
+
|
409
|
+
var smc = SourceMapConsumer.fromSourceMap(smg);
|
410
|
+
assert.equal(smc.file, 'foo.js');
|
411
|
+
assert.equal(smc.sourceRoot, 'http://example.com/');
|
412
|
+
assert.equal(smc.sources.length, 2);
|
413
|
+
assert.equal(smc.sources[0], 'http://example.com/bar.js');
|
414
|
+
assert.equal(smc.sources[1], 'http://example.com/baz.js');
|
415
|
+
assert.equal(smc.sourceContentFor('baz.js'), 'baz.js content');
|
416
|
+
|
417
|
+
var pos = smc.originalPositionFor({
|
418
|
+
line: 2,
|
419
|
+
column: 2
|
420
|
+
});
|
421
|
+
assert.equal(pos.line, 1);
|
422
|
+
assert.equal(pos.column, 1);
|
423
|
+
assert.equal(pos.source, 'http://example.com/bar.js');
|
424
|
+
assert.equal(pos.name, null);
|
425
|
+
|
426
|
+
pos = smc.generatedPositionFor({
|
427
|
+
line: 1,
|
428
|
+
column: 1,
|
429
|
+
source: 'http://example.com/bar.js'
|
430
|
+
});
|
431
|
+
assert.equal(pos.line, 2);
|
432
|
+
assert.equal(pos.column, 2);
|
433
|
+
|
434
|
+
pos = smc.originalPositionFor({
|
435
|
+
line: 4,
|
436
|
+
column: 4
|
437
|
+
});
|
438
|
+
assert.equal(pos.line, 2);
|
439
|
+
assert.equal(pos.column, 2);
|
440
|
+
assert.equal(pos.source, 'http://example.com/baz.js');
|
441
|
+
assert.equal(pos.name, 'dirtMcGirt');
|
442
|
+
|
443
|
+
pos = smc.generatedPositionFor({
|
444
|
+
line: 2,
|
445
|
+
column: 2,
|
446
|
+
source: 'http://example.com/baz.js'
|
447
|
+
});
|
448
|
+
assert.equal(pos.line, 4);
|
449
|
+
assert.equal(pos.column, 4);
|
450
|
+
};
|
451
|
+
});
|