Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #433. Signed-off-by: Bob W. Hogg <rwhogg@linux.com>
- Loading branch information
Alan Parker Lue
authored and
Bob W. Hogg
committed
Nov 23, 2016
1 parent
22bfd08
commit 60d875d
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
require File.expand_path("../../Homebrew/emacs_formula", __FILE__) | ||
|
||
class LedgerMode < EmacsFormula | ||
desc "Emacs major mode for Ledger, the command-line accounting system" | ||
homepage "https://github.com/ledger/ledger-mode" | ||
url "https://github.com/ledger/ledger-mode/archive/v3.1.1.tar.gz" | ||
sha256 "cb1087bf89beb3e38d51c621604c67ec2995fada6e819904ef5276231140cf74" | ||
head "https://github.com/ledger/ledger-mode.git" | ||
|
||
depends_on :emacs | ||
depends_on "cmake" => :build | ||
|
||
def install | ||
system "cmake", ".", *std_cmake_args | ||
system "make" | ||
elisp.install Dir["*.el"], Dir["*.elc"] | ||
end | ||
|
||
test do | ||
(testpath/"test.el").write <<-EOS.undent | ||
(add-to-list 'load-path "#{elisp}") | ||
(load "ledger-mode") | ||
(print (minibuffer-prompt-width)) | ||
EOS | ||
assert_equal "0", shell_output("emacs -Q --batch -l #{testpath}/test.el").strip | ||
end | ||
end |