Skip to content

Commit

Permalink
zsh-completion: add test
Browse files Browse the repository at this point in the history
Closes Homebrew/legacy-homebrew#38055.

Signed-off-by: Xu Cheng <xucheng@me.com>
  • Loading branch information
xu-cheng committed Mar 25, 2015
1 parent be5166b commit 5f9cb2f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion 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"

Expand All @@ -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

0 comments on commit 5f9cb2f

Please sign in to comment.