Add a bunch of stuff, change leader key

git-svn-id: http://photonzero.com/dotfiles/trunk@70 23f722f6-122a-0410-8cef-c75bd312dd78
This commit is contained in:
michener 2010-10-09 02:28:34 +00:00
parent 410560d54e
commit c47f86d55b
90 changed files with 9641 additions and 1653 deletions

View file

@ -0,0 +1,25 @@
spawn $env(VIEW) -N --noplugin -u ../vimrc
set timeout 3
expect {
timeout {exit 1}
"VIM - Vi IMproved"
}
send ":LustyBufferExplorer\r"
# Launching should not have caused a backtrace and "Press ENTER ..." message
expect {
"Changing a readonly file" {exit 1}
"Error detected" {exit 1}
"Press ENTER" {exit 1}
timeout {exit 1}
">>"
}
# ESC
send \033
send ":q\r"
expect {
timeout {exit 1}
eof
}
exit 0

View file

@ -0,0 +1,25 @@
spawn $env(VIM) -N --noplugin -u ../vimrc
set timeout 3
expect {
timeout {exit 1}
"VIM - Vi IMproved"
}
send ":LustyBufferExplorer\r"
# Launching should not have caused a backtrace and "Press ENTER ..." message
expect {
"Press ENTER" {exit 1}
"Error" {exit 1}
"Warning" {exit 1}
timeout {exit 1}
">>"
}
# ESC
send \033
send ":q\r"
expect {
timeout {exit 1}
eof
}
exit 0

View file

@ -0,0 +1,25 @@
spawn $env(VIM) -N --noplugin -u ../vimrc
set timeout 3
expect {
timeout {exit 1}
"VIM - Vi IMproved"
}
send ":LustyBufferGrep\r"
# Launching should not have caused a backtrace and "Press ENTER ..." message
expect {
"Press ENTER" {exit 1}
"Error" {exit 1}
"Warning" {exit 1}
timeout {exit 1}
">>"
}
# ESC
send \033
send ":q\r"
expect {
timeout {exit 1}
eof
}
exit 0

View file

@ -0,0 +1 @@
bar***

View file

@ -0,0 +1,45 @@
spawn $env(VIM) -N --noplugin -u ../vimrc
set timeout 3
expect {
timeout {exit 1}
"VIM - Vi IMproved"
}
send ":e foo\r"
expect {
timeout {exit 1}
"foo###" # Success
}
send ":e bar\r"
expect {
timeout {exit 1}
"bar***" # Success
}
send "otypingblah"
expect {
timeout {exit 1}
"typingblah" # Success
}
# ESC
send \033
send ":LustyBufferExplorer\r"
expect {
"Press ENTER" {exit 1}
"Error" {exit 1}
"Warning" {exit 1}
timeout {exit 1}
"\[+]" # Success
}
send \033
send ":qa!\r"
expect {
timeout {exit 1}
eof
}
exit 0

View file

@ -0,0 +1 @@
foo###

View file

@ -0,0 +1,25 @@
spawn $env(VIM) -N --noplugin -u ../vimrc
set timeout 3
expect {
timeout {exit 1}
"VIM - Vi IMproved"
}
send ":LustyFilesystemExplorer\r"
expect ">>"
send "random-file/"
# Should not have caused a backtrace and "Press ENTER ..." message
expect {
"Press ENTER" {exit 1}
timeout {exit 1}
"NO MATCHES" # Success
}
# ESC
send \033
send ":q\r"
expect {
timeout {exit 1}
eof
}
exit 0

View file

@ -0,0 +1,26 @@
spawn $env(VIEW) -N --noplugin -u ../vimrc
set timeout 3
expect {
timeout {exit 1}
"VIM - Vi IMproved"
}
send ":LustyFilesystemExplorerFromHere\r"
# Launching should not have caused a backtrace and "Press ENTER ..." message
expect {
"Changing a readonly file" {exit 1}
"Press ENTER" {exit 1}
"Error" {exit 1}
"Warning" {exit 1}
timeout {exit 1}
">>"
}
# ESC
send \033
send ":q\r"
expect {
timeout {exit 1}
eof
}
exit 0

View file

@ -0,0 +1,25 @@
spawn $env(VIM) -N --noplugin -u ../vimrc
set timeout 3
expect {
timeout {exit 1}
"VIM - Vi IMproved"
}
send ":LustyFilesystemExplorerFromHere\r"
# Launching should not have caused a backtrace and "Press ENTER ..." message
expect {
"Press ENTER" {exit 1}
"Error" {exit 1}
"Warning" {exit 1}
timeout {exit 1}
">>"
}
# ESC
send \033
send ":q\r"
expect {
timeout {exit 1}
eof
}
exit 0

View file

@ -0,0 +1,26 @@
spawn $env(VIEW) -N --noplugin -u ../vimrc
set timeout 3
expect {
timeout {exit 1}
"VIM - Vi IMproved"
}
send ":LustyFilesystemExplorer\r"
# Launching should not have caused a backtrace and "Press ENTER ..." message
expect {
"Changing a readonly file" {exit 1}
"Press ENTER" {exit 1}
"Error" {exit 1}
"Warning" {exit 1}
timeout {exit 1}
">>"
}
# ESC
send \033
send ":q\r"
expect {
timeout {exit 1}
eof
}
exit 0

View file

@ -0,0 +1,25 @@
spawn $env(VIM) -N --noplugin -u ../vimrc
set timeout 3
expect {
timeout {exit 1}
"VIM - Vi IMproved"
}
send ":LustyFilesystemExplorer\r"
# Launching should not have caused a backtrace and "Press ENTER ..." message
expect {
"Press ENTER" {exit 1}
"Error" {exit 1}
"Warning" {exit 1}
timeout {exit 1}
">>"
}
# ESC
send \033
send ":q\r"
expect {
timeout {exit 1}
eof
}
exit 0

View file

@ -0,0 +1,35 @@
spawn $env(VIM) -N --noplugin -u ../vimrc
set timeout 3
expect {
timeout {exit 1}
"VIM - Vi IMproved"
}
send ":e file-name-abc\r"
send ":e file-name-def\r"
send ":LustyJuggler\r"
# Launching should not have caused a backtrace and "Press ENTER ..." message
expect {
"Press ENTER" {exit 1}
"Error" {exit 1}
"Warning" {exit 1}
timeout {exit 1}
"file-name-abc"
}
# Choose and open second entry
send "ss"
expect {
"Press ENTER" {exit 1}
"Error" {exit 1}
"Warning" {exit 1}
timeout {exit 1}
"inside abc"
}
send ":q\r"
expect {
timeout {exit 1}
eof
}
exit 0

View file

@ -0,0 +1 @@
inside abc

View file

@ -0,0 +1 @@
inside def

View file

@ -0,0 +1,85 @@
spawn $env(VIM) -N --noplugin -u ../vimrc
set timeout 3
expect {
timeout {exit 1}
"VIM - Vi IMproved"
}
# Open >10 files
send ":e file-name-abc\r"
send ":e file-name-def\r"
send ":e file-name-ghi\r"
send ":e file-name-jkl\r"
send ":e file-name-mno\r"
send ":e file-name-pqr\r"
send ":e file-name-stu\r"
send ":e file-name-vwx\r"
send ":e file-name-yza\r"
send ":e file-name-bcd\r"
send ":e file-name-efg\r"
send ":e file-name-hij\r"
send ":LustyJuggler\r"
expect {
"Press ENTER" {exit 1}
"Error" {exit 1}
"Warning" {exit 1}
timeout {exit 1}
"file-name-hij"
}
# Choose and open last entry
send ";;"
expect {
"Press ENTER" {exit 1}
"Error" {exit 1}
"Warning" {exit 1}
timeout {exit 1}
"\"file-name-ghi\""
}
send ":LustyJuggler\r"
expect {
"Press ENTER" {exit 1}
"Error" {exit 1}
"Warning" {exit 1}
timeout {exit 1}
"file-name-hij"
}
# Choose and open last entry
send ";;"
expect {
"Press ENTER" {exit 1}
"Error" {exit 1}
"Warning" {exit 1}
timeout {exit 1}
"\"file-name-jkl\""
}
send ":LustyJuggler\r"
expect {
"Press ENTER" {exit 1}
"Error" {exit 1}
"Warning" {exit 1}
timeout {exit 1}
"file-name-hij"
}
# Choose and open sixth entry
send "hh"
expect {
"Press ENTER" {exit 1}
"Error" {exit 1}
"Warning" {exit 1}
timeout {exit 1}
"\"file-name-yza\""
}
send ":q\r"
expect {
timeout {exit 1}
eof
}
exit 0

View file

@ -0,0 +1 @@
inside abc

View file

@ -0,0 +1 @@
inside bcd

View file

@ -0,0 +1 @@
inside def

View file

@ -0,0 +1 @@
inside efg

View file

@ -0,0 +1 @@
inside ghi

View file

@ -0,0 +1 @@
inside hij

View file

@ -0,0 +1 @@
inside jkl

View file

@ -0,0 +1 @@
inside mno

View file

@ -0,0 +1 @@
inside pqr

View file

@ -0,0 +1 @@
inside stu

View file

@ -0,0 +1 @@
inside vwx

View file

@ -0,0 +1 @@
inside yza

View file

@ -0,0 +1,23 @@
spawn $env(VIM) -N --noplugin -u ../vimrc
set timeout 3
expect {
timeout {exit 1}
"VIM - Vi IMproved"
}
send ":LustyJuggler\r"
# Launching should not have caused a backtrace and "Press ENTER ..." message
expect {
"Press ENTER" {exit 1}
"Error" {exit 1}
"Warning" {exit 1}
timeout {exit 1}
"No other buffers"
}
send ":q\r"
expect {
timeout {exit 1}
eof
}
exit 0

View file

@ -0,0 +1,35 @@
spawn $env(VIM) -N --noplugin -u ../vimrc
set timeout 3
expect {
timeout {exit 1}
"VIM - Vi IMproved"
}
send ":e file-name-abc\r"
send ":e file-name-def\r"
send ":LustyJuggler\r"
# Launching should not have caused a backtrace and "Press ENTER ..." message
expect {
"Press ENTER" {exit 1}
"Error" {exit 1}
"Warning" {exit 1}
timeout {exit 1}
"file-name-abc"
}
# Choose and open second entry
send "22"
expect {
"Press ENTER" {exit 1}
"Error" {exit 1}
"Warning" {exit 1}
timeout {exit 1}
"inside abc"
}
send ":q\r"
expect {
timeout {exit 1}
eof
}
exit 0

View file

@ -0,0 +1 @@
inside abc

View file

@ -0,0 +1 @@
inside def

View file

@ -0,0 +1,35 @@
spawn $env(VIM) -N --noplugin -u ../vimrc
set timeout 3
expect {
timeout {exit 1}
"VIM - Vi IMproved"
}
send ":e file-name-abc\r"
send ":e file-name-def\r"
send ":LustyJuggler\r"
# Launching should not have caused a backtrace and "Press ENTER ..." message
expect {
"Press ENTER" {exit 1}
"Error" {exit 1}
"Warning" {exit 1}
timeout {exit 1}
"file-name-abc"
}
# Choose and open 10th entry -- should be second entry.
send ";;"
expect {
"Press ENTER" {exit 1}
"Error" {exit 1}
"Warning" {exit 1}
timeout {exit 1}
"inside abc"
}
send ":q\r"
expect {
timeout {exit 1}
eof
}
exit 0

View file

@ -0,0 +1 @@
inside abc

View file

@ -0,0 +1 @@
inside def

View file

@ -0,0 +1 @@
switched

View file

@ -0,0 +1 @@
content

View file

@ -0,0 +1,69 @@
spawn $env(VIM) -N --noplugin -u ../vimrc
set timeout 3
expect {
timeout {exit 1}
"VIM - Vi IMproved"
}
send ":e abc\r"
send ":e dir/abc\r"
send ":e dir/def\r"
expect {
"Press ENTER" {exit 1}
"Error" {exit 1}
"Warning" {exit 1}
timeout {exit 1}
"content" # Success
}
send ":LustyBufferExplorer\r"
expect {
"Press ENTER" {exit 1}
"Error" {exit 1}
"Warning" {exit 1}
timeout {exit 1}
">>"
}
send "dir/def\r"
sleep 1
expect {
"Press ENTER" {exit 1}
"Error" {exit 1}
"Warning" {exit 1}
timeout {exit 1}
"NO MATCHES" # Success
}
# ESC
send \033
send ":LustyBufferExplorer\r"
expect {
"Press ENTER" {exit 1}
"Error" {exit 1}
"Warning" {exit 1}
timeout {exit 1}
">>"
}
send "dir/abc\r"
sleep 1
expect {
"Press ENTER" {exit 1}
"Error" {exit 1}
"Warning" {exit 1}
"NO MATCHES" {exit 1}
timeout {exit 1}
"switched" # Success
}
# ESC
send \033
send ":qa!\r"
expect {
timeout {exit 1}
eof
}
exit 0

View file

@ -0,0 +1,37 @@
spawn $env(VIM) -N --noplugin -u ../vimrc
set timeout 3
expect {
timeout {exit 1}
"VIM - Vi IMproved"
}
send ":LustyFilesystemExplorer\r"
expect {
"Press ENTER" {exit 1}
"Error" {exit 1}
"Warning" {exit 1}
timeout {exit 1}
">>" # Success
}
send "file"
# Ctrl-A
send \001
expect {
"Press ENTER" {exit 1}
"Error" {exit 1}
"Warning" {exit 1}
timeout {exit 1}
"opened" # Success
}
# ESC
send \033
send ":qa!\r"
expect {
timeout {exit 1}
eof
}
exit 0

View file

@ -0,0 +1 @@
opened

View file

@ -0,0 +1 @@
opened

View file

@ -0,0 +1 @@
opened

View file

@ -0,0 +1 @@
opened!

View file

@ -0,0 +1,44 @@
spawn $env(VIM) -N --noplugin -u ../vimrc
set timeout 3
expect {
timeout {exit 1}
"VIM - Vi IMproved"
}
send ":LustyFilesystemExplorer\r"
expect {
"Press ENTER" {exit 1}
"Error" {exit 1}
"Warning" {exit 1}
timeout {exit 1}
">>"
}
# Ctrl-N (for next file -- select dir)
send \016
# ENTER -- recurse into dir
send \015
expect {
"Press ENTER" {exit 1}
"Error" {exit 1}
"Warning" {exit 1}
timeout {exit 1}
"file-in-dir"
}
# Enter -- should select
send \015
expect {
"Press ENTER" {exit 1}
"Error" {exit 1}
"Warning" {exit 1}
timeout {exit 1}
"opened!"
}
# ESC
send \033
send ":q\r"
expect {
timeout {exit 1}
eof
}
exit 0

View file

@ -0,0 +1,36 @@
spawn $env(VIM) -N --noplugin -u ../vimrc
set timeout 3
expect {
timeout {exit 1}
"VIM - Vi IMproved"
}
send ":LustyFilesystemExplorer\r"
expect {
timeout {exit 1}
">>"
}
# Ctrl-U
send \025
send "/"
# Should not have caused a backtrace and "Press ENTER ..." message
expect {
"Press ENTER" {exit 1}
timeout {exit 1}
"/"
}
send "12hlx"
expect {
"Press ENTER" {exit 1}
timeout {exit 1}
"12hlx"
}
# ESC
send \033
send ":q\r"
expect {
timeout {exit 1}
eof
}
exit 0

View file

@ -0,0 +1,36 @@
spawn $env(VIM) -N --noplugin -u ../vimrc
set timeout 3
expect {
timeout {exit 1}
"VIM - Vi IMproved"
}
send ":LustyFilesystemExplorer\r"
expect {
timeout {exit 1}
">>"
}
# Ctrl-U
send \025
send "/"
# Should not have caused a backtrace and "Press ENTER ..." message
expect {
"Press ENTER" {exit 1}
timeout {exit 1}
"/"
}
send "home"
expect {
"Press ENTER" {exit 1}
timeout {exit 1}
"home"
}
# ESC
send \033
send ":q\r"
expect {
timeout {exit 1}
eof
}
exit 0

View file

@ -0,0 +1,55 @@
#!/bin/bash
case "$1" in
-h|--help)
echo '[VIM=path/to/vim] ./run-tests.bash [test-dir]'
exit 0
;;
?*)
if [ -d "$1" ]; then
test_dirs="$1"
else
echo "Error: $1 unknown"
exit 1
fi
esac
if [ ! "$VIM" ]; then
export VIM=`which vim`
fi
export VIEW=${VIM%/*}/view
export DISPLAY=
vim_version=$($VIM --version | head -n1)
ruby_version=$($VIM --version | grep -- '-lruby' | \
sed 's/.*-lruby\([^ ]*\).*/\1/')
echo "Testing against:"
echo " $vim_version"
echo " Ruby: $ruby_version"
failures=
if [ ! "$test_dirs" ]; then
test_dirs=*/
fi
for dir in $test_dirs; do
cd $dir
if ! expect -f expect; then
echo "fail: $dir"
failures="$failures $dir"
fi
cd ..
done >/dev/null
if [ "$failures" ]; then
echo
echo "Failing tests: $failures" >&2
exit 1
fi
echo Success

View file

@ -0,0 +1,55 @@
spawn $env(VIM) -N --noplugin -u ../vimrc
set timeout 3
expect {
timeout {exit 1}
"VIM - Vi IMproved"
}
send ":LustyFilesystemExplorer\r"
expect ">>"
send "'"
# Should not have caused a backtrace and "Press ENTER ..." message
expect {
"Press ENTER" {exit 1}
timeout {exit 1}
"foo'" # Success
}
# ESC
send \033
send ":LustyFilesystemExplorer\r"
expect ">>"
send "foo'\r"
# Should not have caused a backtrace and "Press ENTER ..." message
expect {
"Error detected" {exit 1}
"E116" {exit 1}
"E15" {exit 1}
"E32" {exit 1}
"Press ENTER" {exit 1}
timeout {exit 1}
"opened!" # Success -- contents of file
}
send ":LustyBufferExplorer\r"
expect ">>"
send "'\r"
# Should not have caused a backtrace and "Press ENTER ..." message
expect {
"Error detected" {exit 1}
"E116" {exit 1}
"E15" {exit 1}
"E32" {exit 1}
"Press ENTER" {exit 1}
timeout {exit 1}
"'" # Success
}
send \033
send ":q\r"
expect {
timeout {exit 1}
eof
}
exit 0

View file

@ -0,0 +1 @@
opened!

View file

@ -0,0 +1,17 @@
set nocompatible
set hidden
set nobackup
set noswapfile
source ../../plugin/lusty-explorer.vim
source ../../plugin/lusty-juggler.vim
" Not too useful because a bug in Vim causes an E15 error
" whenever a Ruby plugin is called. :-(
function CheckForError()
if empty(v:errmsg)
exec writefile([v:errmsg], "success")
else
exec writefile([v:errmsg], "fail")
endfunction