Add unit tests and code comments for the conditional compilation patch.

Former-commit-id: 557aa43dc7c8db738452a9f3afb8ff2aadf8061a
This commit is contained in:
John-David Dalton
2012-07-17 01:39:51 -04:00
parent 0f8bae950e
commit 624b045ac0
2 changed files with 24 additions and 4 deletions

View File

@@ -855,6 +855,19 @@
ok(false);
}
});
test('should not error with IE conditional comments enabled (test with development build)', function() {
var compiled = _.template(''),
pass = true;
/*@cc_on @*/
try {
compiled();
} catch(e) {
pass = false;
}
ok(pass);
});
}());
/*--------------------------------------------------------------------------*/