reverting tests from @geraldalewis's fix for #1216

This commit is contained in:
Michael Ficarra 2011-05-10 23:23:31 -04:00
parent 2212e959ac
commit a024ec5b27
1 changed files with 0 additions and 35 deletions

View File

@ -268,38 +268,3 @@ test "existential assignment", ->
eq nonce, c
d ?= nonce
eq nonce, d
test "#1216 ?= compilation", ->
c = (s) -> CoffeeScript.compile( s, {bare:true} )
# ?= with locally scoped var defined
eq c('a = 0; a ?= b'),
'''var a;
a = 0;
if (a == null) {
a = b;
};'''
# ?= with locally scoped var not defined
eq c('a ?= b'),
'''if (typeof a === "undefined" || a === null) {
a = b;
};'''
# ? with locally scoped var defined
eq c('a = 0; return unless a?'),
'''
var a;
a = 0;
if (a == null) {
return;
}
'''
# ? with locally scoped var not defined
eq c('return unless a?'),
'''
if (typeof a === "undefined" || a === null) {
return;
}
'''