Bram Moolenaar | dbd24b5 | 2015-08-11 14:26:19 +0200 | [diff] [blame] | 1 | Test for character searches |
| 2 | |
| 3 | STARTTEST |
| 4 | :so small.vim |
| 5 | :" check that "fe" and ";" work |
| 6 | /^X |
| 7 | ylfep;;p,,p: |
| 8 | :" check that save/restore works |
| 9 | /^Y |
| 10 | ylfep:let csave = getcharsearch() |
| 11 | fip:call setcharsearch(csave) |
| 12 | ;p;p: |
Bram Moolenaar | 022b896 | 2016-01-03 22:16:20 +0100 | [diff] [blame^] | 13 | :" check that setcharsearch() changes the settings. |
Bram Moolenaar | dbd24b5 | 2015-08-11 14:26:19 +0200 | [diff] [blame] | 14 | /^Z |
| 15 | ylfep:call setcharsearch({'char': 'k'}) |
| 16 | ;p:call setcharsearch({'forward': 0}) |
| 17 | $;p:call setcharseearch({'until'}: 1}) |
| 18 | ;;p: |
| 19 | :/^X/,$w! test.out |
| 20 | :qa! |
| 21 | ENDTEST |
| 22 | |
| 23 | Xabcdefghijkemnopqretuvwxyz |
| 24 | Yabcdefghijkemnopqretuvwxyz |
| 25 | Zabcdefghijkemnokqretkvwxyz |