The for loop doesn't create a new scope, you can use another function to do it:
var timeInterval = 1000;
for (var i = 0, l = 2; i < l; i++) {
setTimeout((function(i) {
return function() {
$(".test").append("test" + i);
}
})(i), timeInterval);
timeInterval += 1000;
}