Run tests total: 13
Succeeded tests: 8
Failed tests: 5
This page contains unit tests for the Vim engine. Some of the commands are not implemented, and thus fail the test.
Click on the name of the test to see details.
Usually, a test consists of starting text, commands (key combination), expected result, and what actually engine reported after applying the commands.
A passing test has a green header, and a failing one has red.
Tests
1. Visual mode: yank and paste a word
Hello, [t]his is really nice.
[initial]
Hello, this [i]s really nice.
[expected]
Hello, this [i]s really nice.
[result]
Test succeeded.
Hello, [t]his is really nice.
[expected]
Hello, [t]his is really nice.
[result]
Test succeeded.
Hello, this is [r]eally nice.
[expected]
Hello, this is [r]eally nice.
[result]
Test succeeded.
Test failed.
Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'.
exception message
2. Visual mode: yank and paste more than a line
He[l]lo, this is|really nice.
[initial]
Hello, this is|re[a]lly nice.
[expected]
Hello, this is|re[a]lly nice.
[result]
Test succeeded.
He[l]lo, this is|really nice.
[expected]
He[l]lo, this is|really nice.
[result]
Test succeeded.
He[l]llo, this is|realo, this is|really nice.
[expected]
He[l]lo, this is|really nice.
[result]
Test failed.
3. Visual mode: delete word
Hello, [t]his is really nice.
[initial]
Hello, [s] really nice.
[expected]
Hello, [s] really nice.
[result]
Test succeeded.
4. Visual mode: delete two words
Hello, [t]his is really nice.
[initial]
Hello, [e]ally nice.
[expected]
Hello, [e]ally nice.
[result]
Test succeeded.
5. Visual mode: find until next 'n' and delete
Hello, [t]his is really nice.
[initial]
Hello, [t]his is really nice.
[result]
Test failed.
6. Visual block mode: add prefix for lines
Zero|[F]irst|Second|Third|Fourth
[initial]
Zero|[-] First|- Second|- Third|Fourth
[expected]
Zero|[-] First|- Second|- Third|Fourth
[result]
Test succeeded.
7. Visual block mode: advanced movement is allowed
Zero|First|Second|[T]hird|Fourth
[initial]
Zero|First|[-] Second|- Third|Fourth
[expected]
Zero|First|Second|[-] Third|- Fourth
[result]
Test failed.
8. Visual block mode: add text to the end of lines
Zero|Firs[t]|SecondLongIsThis|Third|Fourth
[initial]
Zero|[F]irst?!|- SecondLongIsThis?!|- Third?!|Fourth?!
[expected]
Zero|First|SecondLongIsThis|Thir[d]|Fourth
[result]
Test failed.