diff --git a/test/fixtures/reset/a.coffee b/test/fixtures/reset/a.coffee new file mode 100644 index 0000000..0db65dd --- /dev/null +++ b/test/fixtures/reset/a.coffee @@ -0,0 +1,28 @@ +# Assignment: +number = 42 +opposite = true + +# Conditions: +number = -42 if opposite + +# Functions: +square = (x) -> x * x + +# Arrays: +list = [1, 2, 3, 4, 5] + +# Objects: +math = + root: Math.sqrt + square: square + cube: (x) -> x * square x + +# Splats: +race = (winner, runners...) -> + print winner, runners + +# Existence: +alert "I knew it!" if elvis? + +# Array comprehensions: +cubes = (math.cube num for num in list) diff --git a/test/fixtures/reset/b.coffee b/test/fixtures/reset/b.coffee new file mode 100644 index 0000000..3463c49 --- /dev/null +++ b/test/fixtures/reset/b.coffee @@ -0,0 +1,9 @@ +grade = (student) -> + if student.excellentWork + "A+" + else if student.okayStuff + if student.triedHard then "B" else "B-" + else + "C" + +eldest = if 24 > 21 then "Liz" else "Ike" diff --git a/test/fixtures/reset/d.js b/test/fixtures/reset/d.js new file mode 100644 index 0000000..83357ab --- /dev/null +++ b/test/fixtures/reset/d.js @@ -0,0 +1,44 @@ +var cubes, list, math, num, number, opposite, race, square, + __slice = [].slice; + +number = 42; + +opposite = true; + +if (opposite) { + number = -42; +} + +square = function(x) { + return x * x; +}; + +list = [1, 2, 3, 4, 5]; + +math = { + root: Math.sqrt, + square: square, + cube: function(x) { + return x * square(x); + } +}; + +race = function() { + var runners, winner; + winner = arguments[0], runners = 2 <= arguments.length ? __slice.call(arguments, 1) : []; + return print(winner, runners); +}; + +if (typeof elvis !== "undefined" && elvis !== null) { + alert("I knew it!"); +} + +cubes = (function() { + var _i, _len, _results; + _results = []; + for (_i = 0, _len = list.length; _i < _len; _i++) { + num = list[_i]; + _results.push(math.cube(num)); + } + return _results; +})(); diff --git a/test/fixtures/reset/COMMIT_EDITMSG b/test/fixtures/reset/git.git/COMMIT_EDITMSG similarity index 100% rename from test/fixtures/reset/COMMIT_EDITMSG rename to test/fixtures/reset/git.git/COMMIT_EDITMSG diff --git a/test/fixtures/reset/HEAD b/test/fixtures/reset/git.git/HEAD similarity index 100% rename from test/fixtures/reset/HEAD rename to test/fixtures/reset/git.git/HEAD diff --git a/test/fixtures/reset/ORIG_HEAD b/test/fixtures/reset/git.git/ORIG_HEAD similarity index 100% rename from test/fixtures/reset/ORIG_HEAD rename to test/fixtures/reset/git.git/ORIG_HEAD diff --git a/test/fixtures/reset/config b/test/fixtures/reset/git.git/config similarity index 100% rename from test/fixtures/reset/config rename to test/fixtures/reset/git.git/config diff --git a/test/fixtures/reset/description b/test/fixtures/reset/git.git/description similarity index 100% rename from test/fixtures/reset/description rename to test/fixtures/reset/git.git/description diff --git a/test/fixtures/reset/hooks/applypatch-msg.sample b/test/fixtures/reset/git.git/hooks/applypatch-msg.sample similarity index 100% rename from test/fixtures/reset/hooks/applypatch-msg.sample rename to test/fixtures/reset/git.git/hooks/applypatch-msg.sample diff --git a/test/fixtures/reset/hooks/commit-msg.sample b/test/fixtures/reset/git.git/hooks/commit-msg.sample similarity index 100% rename from test/fixtures/reset/hooks/commit-msg.sample rename to test/fixtures/reset/git.git/hooks/commit-msg.sample diff --git a/test/fixtures/reset/hooks/post-update.sample b/test/fixtures/reset/git.git/hooks/post-update.sample similarity index 100% rename from test/fixtures/reset/hooks/post-update.sample rename to test/fixtures/reset/git.git/hooks/post-update.sample diff --git a/test/fixtures/reset/hooks/pre-applypatch.sample b/test/fixtures/reset/git.git/hooks/pre-applypatch.sample similarity index 100% rename from test/fixtures/reset/hooks/pre-applypatch.sample rename to test/fixtures/reset/git.git/hooks/pre-applypatch.sample diff --git a/test/fixtures/reset/hooks/pre-commit.sample b/test/fixtures/reset/git.git/hooks/pre-commit.sample similarity index 100% rename from test/fixtures/reset/hooks/pre-commit.sample rename to test/fixtures/reset/git.git/hooks/pre-commit.sample diff --git a/test/fixtures/reset/hooks/pre-push.sample b/test/fixtures/reset/git.git/hooks/pre-push.sample similarity index 100% rename from test/fixtures/reset/hooks/pre-push.sample rename to test/fixtures/reset/git.git/hooks/pre-push.sample diff --git a/test/fixtures/reset/hooks/pre-rebase.sample b/test/fixtures/reset/git.git/hooks/pre-rebase.sample similarity index 100% rename from test/fixtures/reset/hooks/pre-rebase.sample rename to test/fixtures/reset/git.git/hooks/pre-rebase.sample diff --git a/test/fixtures/reset/hooks/prepare-commit-msg.sample b/test/fixtures/reset/git.git/hooks/prepare-commit-msg.sample similarity index 100% rename from test/fixtures/reset/hooks/prepare-commit-msg.sample rename to test/fixtures/reset/git.git/hooks/prepare-commit-msg.sample diff --git a/test/fixtures/reset/hooks/update.sample b/test/fixtures/reset/git.git/hooks/update.sample similarity index 100% rename from test/fixtures/reset/hooks/update.sample rename to test/fixtures/reset/git.git/hooks/update.sample diff --git a/test/fixtures/reset/index b/test/fixtures/reset/git.git/index similarity index 100% rename from test/fixtures/reset/index rename to test/fixtures/reset/git.git/index diff --git a/test/fixtures/reset/info/exclude b/test/fixtures/reset/git.git/info/exclude similarity index 100% rename from test/fixtures/reset/info/exclude rename to test/fixtures/reset/git.git/info/exclude diff --git a/test/fixtures/reset/info/refs b/test/fixtures/reset/git.git/info/refs similarity index 100% rename from test/fixtures/reset/info/refs rename to test/fixtures/reset/git.git/info/refs diff --git a/test/fixtures/reset/logs/HEAD b/test/fixtures/reset/git.git/logs/HEAD similarity index 100% rename from test/fixtures/reset/logs/HEAD rename to test/fixtures/reset/git.git/logs/HEAD diff --git a/test/fixtures/reset/logs/refs/heads/f-gitCheckoutFiles b/test/fixtures/reset/git.git/logs/refs/heads/f-gitCheckoutFiles similarity index 100% rename from test/fixtures/reset/logs/refs/heads/f-gitCheckoutFiles rename to test/fixtures/reset/git.git/logs/refs/heads/f-gitCheckoutFiles diff --git a/test/fixtures/reset/logs/refs/heads/master b/test/fixtures/reset/git.git/logs/refs/heads/master similarity index 100% rename from test/fixtures/reset/logs/refs/heads/master rename to test/fixtures/reset/git.git/logs/refs/heads/master diff --git a/test/fixtures/reset/objects/14/e5a1a3a459e05d486b98df2802ee4b30c33995 b/test/fixtures/reset/git.git/objects/14/e5a1a3a459e05d486b98df2802ee4b30c33995 similarity index 100% rename from test/fixtures/reset/objects/14/e5a1a3a459e05d486b98df2802ee4b30c33995 rename to test/fixtures/reset/git.git/objects/14/e5a1a3a459e05d486b98df2802ee4b30c33995 diff --git a/test/fixtures/reset/objects/41/2d321c36a34331125a77493b5dd41f5313a568 b/test/fixtures/reset/git.git/objects/41/2d321c36a34331125a77493b5dd41f5313a568 similarity index 100% rename from test/fixtures/reset/objects/41/2d321c36a34331125a77493b5dd41f5313a568 rename to test/fixtures/reset/git.git/objects/41/2d321c36a34331125a77493b5dd41f5313a568 diff --git a/test/fixtures/reset/objects/55/80d8a9feeadf1c36a73a2778c62206314aebac b/test/fixtures/reset/git.git/objects/55/80d8a9feeadf1c36a73a2778c62206314aebac similarity index 100% rename from test/fixtures/reset/objects/55/80d8a9feeadf1c36a73a2778c62206314aebac rename to test/fixtures/reset/git.git/objects/55/80d8a9feeadf1c36a73a2778c62206314aebac diff --git a/test/fixtures/reset/objects/56/02c1d7079f5ff3f49f341722c6d5baf93bb26e b/test/fixtures/reset/git.git/objects/56/02c1d7079f5ff3f49f341722c6d5baf93bb26e similarity index 100% rename from test/fixtures/reset/objects/56/02c1d7079f5ff3f49f341722c6d5baf93bb26e rename to test/fixtures/reset/git.git/objects/56/02c1d7079f5ff3f49f341722c6d5baf93bb26e diff --git a/test/fixtures/reset/objects/c2/dfadf4d76bea7fbe28086d95aa0c803237539e b/test/fixtures/reset/git.git/objects/c2/dfadf4d76bea7fbe28086d95aa0c803237539e similarity index 100% rename from test/fixtures/reset/objects/c2/dfadf4d76bea7fbe28086d95aa0c803237539e rename to test/fixtures/reset/git.git/objects/c2/dfadf4d76bea7fbe28086d95aa0c803237539e diff --git a/test/fixtures/reset/objects/info/packs b/test/fixtures/reset/git.git/objects/info/packs similarity index 100% rename from test/fixtures/reset/objects/info/packs rename to test/fixtures/reset/git.git/objects/info/packs diff --git a/test/fixtures/reset/objects/pack/pack-70f08ce8f755306c59b6d804345abf334b5586f8.idx b/test/fixtures/reset/git.git/objects/pack/pack-70f08ce8f755306c59b6d804345abf334b5586f8.idx similarity index 100% rename from test/fixtures/reset/objects/pack/pack-70f08ce8f755306c59b6d804345abf334b5586f8.idx rename to test/fixtures/reset/git.git/objects/pack/pack-70f08ce8f755306c59b6d804345abf334b5586f8.idx diff --git a/test/fixtures/reset/objects/pack/pack-70f08ce8f755306c59b6d804345abf334b5586f8.pack b/test/fixtures/reset/git.git/objects/pack/pack-70f08ce8f755306c59b6d804345abf334b5586f8.pack similarity index 100% rename from test/fixtures/reset/objects/pack/pack-70f08ce8f755306c59b6d804345abf334b5586f8.pack rename to test/fixtures/reset/git.git/objects/pack/pack-70f08ce8f755306c59b6d804345abf334b5586f8.pack diff --git a/test/fixtures/reset/packed-refs b/test/fixtures/reset/git.git/packed-refs similarity index 100% rename from test/fixtures/reset/packed-refs rename to test/fixtures/reset/git.git/packed-refs diff --git a/test/fixtures/reset/rawr.txt b/test/fixtures/reset/rawr.txt new file mode 100644 index 0000000..8baef1b --- /dev/null +++ b/test/fixtures/reset/rawr.txt @@ -0,0 +1 @@ +abc