<commit_before>class Pgpdump < Formula
  homepage "http://www.mew.org/~kazu/proj/pgpdump/en/"
  url "http://www.mew.org/~kazu/proj/pgpdump/pgpdump-0.29.tar.gz"
  sha256 "6215d9af806399fec73d81735cf20ce91033a7a89a82c4318c4d1659083ff663"

  def install
    system "./configure", "--prefix=#{prefix}"
    bin.mkpath
    man1.mkpath
    system "make", "install"
  end

  test do
    system "#{bin}/pgpdump", "-v"
  end
end
<commit_msg>pgpdump: head and better test added<commit_after>class Pgpdump < Formula
  homepage "http://www.mew.org/~kazu/proj/pgpdump/en/"
  url "http://www.mew.org/~kazu/proj/pgpdump/pgpdump-0.29.tar.gz"
  sha256 "6215d9af806399fec73d81735cf20ce91033a7a89a82c4318c4d1659083ff663"

  head "https://github.com/kazu-yamamoto/pgpdump.git"

  def install
    system "./configure", "--prefix=#{prefix}"
    system "make", "install"
  end

  test do
    (testpath/"sig.pgp").write <<-EOS.undent
      -----BEGIN PGP MESSAGE-----
      Version: GnuPG v1.2.6 (NetBSD)
      Comment: For info see http://www.gnupg.org

      owGbwMvMwCSYq3dE6sEMJU7GNYZJLGmZOanWn4xaQzIyixWAKFEhN7W4ODE9VaEk
      XyEpVaE4Mz0vNUUhqVIhwD1Aj6vDnpmVAaQeZogg060chvkFjPMr2CZNmPnwyebF
      fJP+td+b6biAYb779N1eL3gcHUyNsjliW1ekbZk6wRwA
      =+jUx
      -----END PGP MESSAGE-----
    EOS

    assert_match(/Key ID - 0x6D2EC41AE0982209/,
                 shell_output("#{bin}/pgpdump sig.pgp"))
  end
end

{'fraction_non_alphanumeric': 0.1365923795830338, 'fraction_numerical': 0.10136592379583034, 'mean_word_length': 3.2699386503067487, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 5, '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': '2595286', 'n_tokens_mistral': 712, 'n_tokens_neox': 620, 'n_words': 83}