diff options
| author | Zhiming Wang | 2015-01-10 14:58:41 -0800 |
|---|---|---|
| committer | Tim D. Smith | 2015-01-11 09:57:58 -0800 |
| commit | ede978ac4385b50676b1551a1a8ce6481d1ba86d (patch) | |
| tree | 458e509f09dbde4decba380ddfed4703eb8a856f /Library/Formula | |
| parent | fb415b59e90c7082121d268fcba7f53c3e1a27e9 (diff) | |
| download | homebrew-ede978ac4385b50676b1551a1a8ce6481d1ba86d.tar.bz2 | |
commonmark 0.15 (new formula)
Closes #35735.
Signed-off-by: Tim D. Smith <git@tim-smith.us>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/commonmark.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Library/Formula/commonmark.rb b/Library/Formula/commonmark.rb new file mode 100644 index 000000000..40c2355b3 --- /dev/null +++ b/Library/Formula/commonmark.rb @@ -0,0 +1,25 @@ +class Commonmark < Formula + homepage "http://commonmark.org" + url "https://github.com/jgm/CommonMark/archive/0.15.tar.gz" + sha1 "877665a96fdc5fcc42ec2cd605d8535344a27b72" + + depends_on "cmake" => :build + depends_on :python3 => :build + + def install + mkdir "build" do + system "cmake", "..", *std_cmake_args + ENV.deparallelize # https://github.com/jgm/CommonMark/issues/279 + system "make" + system "make", "test" + system "make", "install" + end + end + + test do + test_input = "*hello, world*\n" + expected_output = "<p><em>hello, world</em></p>\n" + test_output = `/bin/echo -n "#{test_input}" | #{bin}/cmark` + assert_equal expected_output, test_output + end +end |
