tizen beta release
[profile/ivi/webkit-efl.git] / LayoutTests / fast / js / kde / script-tests / completion.js
1 var i = 1;
2
3 function foo() {
4   i = 2;
5   return;
6   i = 3;
7 }
8
9 shouldBe("foo(), i", "2");
10
11 var caught = false;
12 try { eval("return;"); } catch(e) { caught = true; }
13 shouldBeTrue("caught");
14
15 // value completions take precedence
16 var val = eval("11; { }");
17 shouldBe("val", "11");
18 val = eval("12; ;");
19 shouldBe("val", "12");
20 val = eval("13; if(false);");
21 shouldBe("val", "13");
22 val = eval("14; function f() {}");
23 shouldBe("val", "14");
24 val = eval("15; var v = 0");
25 shouldBe("val", "15");