| This test checks text editor javascript formatting. |
| |
| /** |
| * Multi-line comment |
| * |
| */ |
| function foo(n) { |
| // one-line comment |
| function bar() { |
| return 42; |
| } |
| |
| var sum = 0; |
| for(var i = 0; i < n; ++i) { |
| for(var j = 0; j < n; ++j) { |
| sum += i + j; |
| } |
| } |
| |
| |
| if (sum > 1000) { |
| while (sum > 0) { |
| --sum; |
| } |
| } |
| } |
| ============ editor contents start ============ |
| /** |
| *.Multi-line.comment |
| * |
| */ |
| function.foo(n).{ |
| ....//.one-line.comment |
| ....function.bar().{ |
| ........return.42; |
| ....} |
| .... |
| ....var.sum.=.0; |
| ....for(var.i.=.0;.i.<.n;.++i).{ |
| ........for(var.j.=.0;.j.<.n;.++j).{ |
| ............sum.+=.i.+.j; |
| ........} |
| ....} |
| .... |
| .... |
| ....if.(sum.>.1000).{ |
| ........while.(sum.>.0).{ |
| ............--sum; |
| ........} |
| ....} |
| } |
| |
| ============ editor contents end ============ |
| |