add test case: foreach(i in begin .. end)