Skip to content

Commit

Permalink
Merge pull request NixOS#2 from aszlig/test-nix-expression
Browse files Browse the repository at this point in the history
Add test.nix file to make testing easier with Nix.
  • Loading branch information
LnL7 committed Dec 8, 2015
2 parents f4e8234 + 2f5def9 commit cb3f14a
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions test.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
with import <nixpkgs> {};

let
vader = fetchFromGitHub {
owner = "junegunn";
repo = "vader.vim";
rev = "ad2c752435baba9e7544d0046f0277c3573439bd";
sha256 = "0yvnah4lxk5w5qidc3y5nvl6lpi8rcv26907b3w7vjskqc935b8f";
};

src = ./.;

rcFile = writeText "vimrc" ''
filetype off
set rtp+=${vader}
set rtp+=${src}
filetype plugin indent on
syntax enable
'';

run = ''
${vim}/bin/vim -XNu '${rcFile}' -i NONE \
-c 'Vader! ${src}/test/*.vader' > /dev/null
'';

in runCommand "vim-nix-test.log" {} ''
(${run}) 2>&1 | tee "$out" >&2
''

0 comments on commit cb3f14a

Please sign in to comment.