Bram Moolenaar | f9660b5 | 2016-04-16 22:19:15 +0200 | [diff] [blame] | 1 | " Test commands that jump somewhere. |
| 2 | |
Bram Moolenaar | 23c60f2 | 2016-06-15 22:03:48 +0200 | [diff] [blame] | 3 | func Test_geeDEE() |
Bram Moolenaar | f9660b5 | 2016-04-16 22:19:15 +0200 | [diff] [blame] | 4 | new |
| 5 | call setline(1, ["Filename x;", "", "int Filename", "int func() {", "Filename y;"]) |
| 6 | /y;/ |
| 7 | normal gD |
| 8 | call assert_equal(1, line('.')) |
| 9 | quit! |
| 10 | endfunc |
Bram Moolenaar | 23c60f2 | 2016-06-15 22:03:48 +0200 | [diff] [blame] | 11 | |
| 12 | func Test_gee_dee() |
| 13 | new |
| 14 | call setline(1, ["int x;", "", "int func(int x)", "{", " return x;", "}"]) |
| 15 | /return/ |
| 16 | normal $hgd |
| 17 | call assert_equal(3, line('.')) |
| 18 | call assert_equal(14, col('.')) |
| 19 | quit! |
| 20 | endfunc |