highlighting-kate 0.5.15 (new formula)

https://github.com/jgm/highlighting-kate

Closes Homebrew/homebrew#39341.

Signed-off-by: Tim D. Smith <git@tim-smith.us>
This commit is contained in:
Zhiming Wang 2015-05-04 01:59:01 -07:00 committed by Tim D. Smith
parent e25782b8bf
commit e8ce3ec98b

View file

@ -0,0 +1,31 @@
require "language/haskell"
class HighlightingKate < Formula
include Language::Haskell::Cabal
homepage "https://github.com/jgm/highlighting-kate"
url "https://hackage.haskell.org/package/highlighting-kate-0.5.15/highlighting-kate-0.5.15.tar.gz"
sha256 "e4e52471dcef0771109d1f748ca9989a32eac8a31971b7e09e1c81c6cef7e945"
head "https://github.com/jgm/highlighting-kate.git"
depends_on "ghc" => :build
depends_on "cabal-install" => :build
depends_on "gmp"
def install
cabal_sandbox do
cabal_install "--only-dependencies"
cabal_install "--prefix=#{prefix}", "-fexecutable"
end
cabal_clean_lib
end
test do
test_input = "*hello, world*\n"
test_output = `/bin/echo -n "#{test_input}" | #{bin}/highlighting-kate -s markdown`
test_output_last_line = test_output.split("\n")[-1]
expected_last_line = '</style></head><body><div class="sourceCode"><pre class="sourceCode"><code class="sourceCode">*hello, world*</code></pre></div></body>'
assert_equal expected_last_line, test_output_last_line
end
end