Kate Vi Mode Test Suite – GSoC 2011

This summer vi mode has a new test suite. Now there are over 250 tests and the number of them still growing.
It’s very easy to add a new test. All you need is just to add the
DoTest(“Original text”,”Vi command”,”Expected text after doing vi command”);
line to part/tests/vimode_test.cpp.
Format for command with CTRL – modifier: \\ctrl-x, for command -mode command: \\:command\\.
There are little restriction: you can’t input text while being in input mode.

Exampls:
DoTest(“foobar”,”Vypp”,”foobar\nfoobar\nfoobar”);
DoTest(“foo\nbar”,”\\ctrl-vjl~”,”FOo\nBAr”);
DoTest(“foo\nbar\nbaz”,”\\:2,3delete\\”,”foo”);

It’s also a good format for bug report or for feature wish for vi-mode.

One thought on “Kate Vi Mode Test Suite – GSoC 2011”

  1. Just thought that one of the easy ways to generate lots of different tests is to import tasks and solutions from vimgolf

Leave a Reply