Permalink
Browse files

Add helper script for testing against multiple vims

  • Loading branch information...
1 parent 98c8fe2 commit 4bfb1e646ee6a441abfd464597f87e00fa295873 @rwstauner committed Mar 17, 2012
Showing with 35 additions and 0 deletions.
  1. +35 −0 corpus/prove_each_vim
View
@@ -0,0 +1,35 @@
+#!/usr/bin/env perl
+
+use strict;
+use warnings;
+my @vims;
+my @prove = qw(prove -lr t);
+
+# args following -- are alternate command... any args before are vim dirs
+while( my $arg = shift(@ARGV) ){
+ if( $arg eq '--' ){
+ @prove = @ARGV;
+ last;
+ }
+ push @vims, $arg;
+}
+
+die <<USAGE unless @vims;
+No vims specified. Please pass directories of vim installations:
+ $0 ~/vim5 ~/vim6
+
+This will run the test suite (or anything added after "--")
+with ~/vim5/bin prepended to the PATH:
+ PATH=~vim5/bin:\$PATH prove -lr t
+ PATH=~vim6/bin:\$PATH prove -lr t
+
+Or
+ $0 ~/vim6 -- which vim
+Will just run
+ PATH=~vim6/bin:\$PATH which vim
+USAGE
+
+foreach my $vim ( @vims ){
+ local $ENV{PATH} = "$vim/bin:$ENV{PATH}";
+ system(@prove);
+}

0 comments on commit 4bfb1e6

Please sign in to comment.