Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make it easy to run-tests with diff. vim versions
  • Loading branch information
sjbach committed Sep 25, 2010
1 parent 51364dd commit 4a6bd9b
Show file tree
Hide file tree
Showing 21 changed files with 54 additions and 21 deletions.
2 changes: 1 addition & 1 deletion tests/buffer-explorer-view/expect
@@ -1,4 +1,4 @@
spawn view -N --noplugin -u ../vimrc spawn $env(VIEW) -N --noplugin -u ../vimrc
set timeout 3 set timeout 3
expect { expect {
timeout {exit 1} timeout {exit 1}
Expand Down
2 changes: 1 addition & 1 deletion tests/buffer-explorer/expect
@@ -1,4 +1,4 @@
spawn vim -N --noplugin -u ../vimrc spawn $env(VIM) -N --noplugin -u ../vimrc
set timeout 3 set timeout 3
expect { expect {
timeout {exit 1} timeout {exit 1}
Expand Down
2 changes: 1 addition & 1 deletion tests/buffer-grep-explorer/expect
@@ -1,4 +1,4 @@
spawn vim -N --noplugin -u ../vimrc spawn $env(VIM) -N --noplugin -u ../vimrc
set timeout 3 set timeout 3
expect { expect {
timeout {exit 1} timeout {exit 1}
Expand Down
2 changes: 1 addition & 1 deletion tests/buffer-modified/expect
@@ -1,4 +1,4 @@
spawn vim -N --noplugin -u ../vimrc spawn $env(VIM) -N --noplugin -u ../vimrc
set timeout 3 set timeout 3
expect { expect {
timeout {exit 1} timeout {exit 1}
Expand Down
2 changes: 1 addition & 1 deletion tests/file-as-dir/expect
@@ -1,4 +1,4 @@
spawn vim -N --noplugin -u ../vimrc spawn $env(VIM) -N --noplugin -u ../vimrc
set timeout 3 set timeout 3
expect { expect {
timeout {exit 1} timeout {exit 1}
Expand Down
2 changes: 1 addition & 1 deletion tests/filesystem-explorer-from-here-view/expect
@@ -1,4 +1,4 @@
spawn view -N --noplugin -u ../vimrc spawn $env(VIEW) -N --noplugin -u ../vimrc
set timeout 3 set timeout 3
expect { expect {
timeout {exit 1} timeout {exit 1}
Expand Down
2 changes: 1 addition & 1 deletion tests/filesystem-explorer-from-here/expect
@@ -1,4 +1,4 @@
spawn vim -N --noplugin -u ../vimrc spawn $env(VIM) -N --noplugin -u ../vimrc
set timeout 3 set timeout 3
expect { expect {
timeout {exit 1} timeout {exit 1}
Expand Down
2 changes: 1 addition & 1 deletion tests/filesystem-explorer-view/expect
@@ -1,4 +1,4 @@
spawn view -N --noplugin -u ../vimrc spawn $env(VIEW) -N --noplugin -u ../vimrc
set timeout 3 set timeout 3
expect { expect {
timeout {exit 1} timeout {exit 1}
Expand Down
2 changes: 1 addition & 1 deletion tests/filesystem-explorer/expect
@@ -1,4 +1,4 @@
spawn vim -N --noplugin -u ../vimrc spawn $env(VIM) -N --noplugin -u ../vimrc
set timeout 3 set timeout 3
expect { expect {
timeout {exit 1} timeout {exit 1}
Expand Down
2 changes: 1 addition & 1 deletion tests/juggler-letters/expect
@@ -1,4 +1,4 @@
spawn vim -N --noplugin -u ../vimrc spawn $env(VIM) -N --noplugin -u ../vimrc
set timeout 3 set timeout 3
expect { expect {
timeout {exit 1} timeout {exit 1}
Expand Down
2 changes: 1 addition & 1 deletion tests/juggler-more-than-10/expect
@@ -1,4 +1,4 @@
spawn vim -N --noplugin -u ../vimrc spawn $env(VIM) -N --noplugin -u ../vimrc
set timeout 3 set timeout 3
expect { expect {
timeout {exit 1} timeout {exit 1}
Expand Down
2 changes: 1 addition & 1 deletion tests/juggler-no-other-buffers/expect
@@ -1,4 +1,4 @@
spawn vim -N --noplugin -u ../vimrc spawn $env(VIM) -N --noplugin -u ../vimrc
set timeout 3 set timeout 3
expect { expect {
timeout {exit 1} timeout {exit 1}
Expand Down
2 changes: 1 addition & 1 deletion tests/juggler-numbers/expect
@@ -1,4 +1,4 @@
spawn vim -N --noplugin -u ../vimrc spawn $env(VIM) -N --noplugin -u ../vimrc
set timeout 3 set timeout 3
expect { expect {
timeout {exit 1} timeout {exit 1}
Expand Down
2 changes: 1 addition & 1 deletion tests/juggler-out-of-bounds/expect
@@ -1,4 +1,4 @@
spawn vim -N --noplugin -u ../vimrc spawn $env(VIM) -N --noplugin -u ../vimrc
set timeout 3 set timeout 3
expect { expect {
timeout {exit 1} timeout {exit 1}
Expand Down
2 changes: 1 addition & 1 deletion tests/longest-common-prefix/expect
@@ -1,4 +1,4 @@
spawn vim -N --noplugin -u ../vimrc spawn $env(VIM) -N --noplugin -u ../vimrc
set timeout 3 set timeout 3
expect { expect {
timeout {exit 1} timeout {exit 1}
Expand Down
2 changes: 1 addition & 1 deletion tests/open-all/expect
@@ -1,4 +1,4 @@
spawn vim -N --noplugin -u ../vimrc spawn $env(VIM) -N --noplugin -u ../vimrc
set timeout 3 set timeout 3
expect { expect {
timeout {exit 1} timeout {exit 1}
Expand Down
2 changes: 1 addition & 1 deletion tests/recurse-no-selection/expect
@@ -1,4 +1,4 @@
spawn vim -N --noplugin -u ../vimrc spawn $env(VIM) -N --noplugin -u ../vimrc
set timeout 3 set timeout 3
expect { expect {
timeout {exit 1} timeout {exit 1}
Expand Down
2 changes: 1 addition & 1 deletion tests/root-navigation-nonexistent-file/expect
@@ -1,4 +1,4 @@
spawn vim -N --noplugin -u ../vimrc spawn $env(VIM) -N --noplugin -u ../vimrc
set timeout 3 set timeout 3
expect { expect {
timeout {exit 1} timeout {exit 1}
Expand Down
2 changes: 1 addition & 1 deletion tests/root-navigation/expect
@@ -1,4 +1,4 @@
spawn vim -N --noplugin -u ../vimrc spawn $env(VIM) -N --noplugin -u ../vimrc
set timeout 3 set timeout 3
expect { expect {
timeout {exit 1} timeout {exit 1}
Expand Down
35 changes: 34 additions & 1 deletion tests/run-tests.bash
@@ -1,9 +1,42 @@
#!/bin/bash #!/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= 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= failures=


for dir in */; do if [ ! "$test_dirs" ]; then
test_dirs=*/
fi

for dir in $test_dirs; do
cd $dir cd $dir
if ! expect -f expect; then if ! expect -f expect; then
echo "fail: $dir" echo "fail: $dir"
Expand Down
2 changes: 1 addition & 1 deletion tests/single-quote/expect
@@ -1,4 +1,4 @@
spawn vim -N --noplugin -u ../vimrc spawn $env(VIM) -N --noplugin -u ../vimrc
set timeout 3 set timeout 3
expect { expect {
timeout {exit 1} timeout {exit 1}
Expand Down

0 comments on commit 4a6bd9b

Please sign in to comment.