From 5f9cb2fc124482d592edf9699e3001eb51504ab6 Mon Sep 17 00:00:00 2001 From: Xu Cheng Date: Wed, 25 Mar 2015 20:35:54 +0800 Subject: [PATCH] zsh-completion: add test Closes Homebrew/homebrew#38055. Signed-off-by: Xu Cheng --- Formula/zsh-completions.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Formula/zsh-completions.rb b/Formula/zsh-completions.rb index d61aa71e2636b..52ae844d28212 100644 --- a/Formula/zsh-completions.rb +++ b/Formula/zsh-completions.rb @@ -1,7 +1,7 @@ class ZshCompletions < Formula homepage "https://github.com/zsh-users/zsh-completions" url "https://github.com/zsh-users/zsh-completions/archive/0.12.0.tar.gz" - sha1 "1c39734328b28c619a55fa52fa42e81c314aeadf" + sha256 "770d92749b11b22192595b207208508f8bfa319d5d03210a71bc44c8b9cfa0d5" head "https://github.com/zsh-users/zsh-completions.git" @@ -25,4 +25,13 @@ def caveats chmod go-w /usr/local/share EOS end + + test do + (testpath/".zshrc").write <<-EOS.undent + fpath=(#{HOMEBREW_PREFIX}/share/zsh-completions $fpath) + autoload -U compinit + compinit + EOS + system "/bin/zsh", "--login", "-i", "-c", "which _ack" + end end