Vim: Test driven configuring with DejaGnu
From FVue
Problem
Configuring Vim should be test driven. How else can I make sure all configuration settings remain in effect?
Journal
20060827
I'm going to use Tcl and Expect. First attempt with interactive expect:
bash> expect expect1.1> set timeout 1 1 expect1.2> spawn vim spawn vim 24456 expect1.2> expect q
Problem Expect: Readline functionality
20060830
Second attempt. Remember to quote ("") arguments.
bash> expect expect1.1> set timeout 1 1 expect1.2> spawn vim spawn vim 24456 expect1.3> send "iHello, world!" expect1.4> expect "foo" Hello, world!^[[>0;115;0cexpect1.5>
Third attempt. Testing completion (^P)
bash> expect expect1.1> set timeout 1 1 expect1.2> spawn vim spawn vim 24456 expect1.3> send "iHello, world! H^P" expect1.4> expect "foo" Hello, world! Hello^[[>0;115;0cexpect1.5>
20061126
The difficulty with testing Vim with expect is the output of all these terminal escape codes. Can they be filtered? But they might be needed for testing. I'd better output the state of Vim to a text file and use this text file for verifying.
Advertisement