Commit 01e136fb authored by Jason Miller's avatar Jason Miller
Browse files

Add tests for limitless for-as-arithmetic loop

parent 4c3e76bc
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -650,6 +650,20 @@ while (film.isNotFinished()) {
};
}).call(this);")

(test-ps-js iteration-constructs-10
  (loop for i from 1 while (foo))
"(function () {
    for (var i = 1; foo(); i += 1) {
    };
})();")

(test-ps-js iteration-constructs-11
  (loop for i from 1)
"(function () {
    for (var i = 1; true; i += 1) {
    };
})();")

(test-ps-js loop-for-bindings
  (loop :for ((a b) (:c :d)) :in arr :do (foo a b c d))
"(function () {