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:
parent
e25782b8bf
commit
e8ce3ec98b
1 changed files with 31 additions and 0 deletions
31
Formula/highlighting-kate.rb
Normal file
31
Formula/highlighting-kate.rb
Normal 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
|
Loading…
Reference in a new issue