<commit_before>require File.expand_path("../../Homebrew/emacs_formula", __FILE__)

class Seq < EmacsFormula
  desc "Sequence manipulation library for Emacs"
  homepage "https://elpa.gnu.org/packages/seq.html"
  url "https://elpa.gnu.org/packages/seq-2.16.tar"
  sha256 "6ac63594fa2d53e524b007283cd183100192fb9d8bbcfde17c3dd3b1966481b9"
  head "https://github.com/NicolasPetton/seq.el.git"

  depends_on :emacs

  def install
    byte_compile Dir["*.el"]
    elisp.install Dir["*.el"], Dir["*.elc"]
  end

  test do
    (testpath/"test.el").write <<-EOS.undent
      (add-to-list 'load-path "#{share}/emacs/site-lisp/seq")
      (load "seq")
      (print (seq-max '(1 5 10)))
    EOS
    assert_equal "10", shell_output("emacs -Q --batch -l #{testpath}/test.el").strip
  end
end
<commit_msg>seq 2.19<commit_after>require File.expand_path("../../Homebrew/emacs_formula", __FILE__)

class Seq < EmacsFormula
  desc "Sequence manipulation library for Emacs"
  homepage "https://elpa.gnu.org/packages/seq.html"
  url "https://elpa.gnu.org/packages/seq-2.19.tar"
  sha256 "0a7e93f52bb7afd28d36c1362f7da9e301694e813f3b2699a6011265743c0b86"

  depends_on :emacs => "24.1"

  # Submitted upstream via email on 2016-10-28
  patch :p3 do
    url "https://github.com/dunn/elpa/commit/195320c704cbc721f945d59fa54cd20d8e024a57.diff"
    sha256 "f4967cac92cfe462eca073c27db1422299acae5d0a99cacac8c14555ab616142"
  end

  def install
    ert_run_tests "tests/seq-tests.el"
    byte_compile Dir["*.el"]
    elisp.install Dir["*.el"], Dir["*.elc"]
  end

  test do
    (testpath/"test.el").write <<-EOS.undent
      (add-to-list 'load-path "#{share}/emacs/site-lisp/seq")
      (load "seq")
      (print (seq-max '(1 5 10)))
    EOS
    assert_equal "10", shell_output("emacs -Q --batch -l #{testpath}/test.el").strip
  end
end

{'fraction_non_alphanumeric': 0.15248618784530388, 'fraction_numerical': 0.10552486187845304, 'mean_word_length': 3.667525773195876, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 4, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1492517', 'n_tokens_mistral': 838, 'n_tokens_neox': 724, 'n_words': 124}