<commit_before>class Bcrypt < Formula
  homepage "http://bcrypt.sourceforge.net"
  url "http://bcrypt.sourceforge.net/bcrypt-1.1.tar.gz"
  sha1 "fd4c7c83fdc560f143bb0e0a8c9fb7aa57e69698"

  def install
    system "make", "CC=#{ENV.cc}",
                   "CFLAGS=#{ENV.cflags}",
                   "LDFLAGS=-lz"
    bin.install "bcrypt"
    man1.install gzip("bcrypt.1")
  end
end<commit_msg>bcrypt: add test<commit_after>class Bcrypt < Formula
  homepage "http://bcrypt.sourceforge.net"
  url "http://bcrypt.sourceforge.net/bcrypt-1.1.tar.gz"
  sha1 "fd4c7c83fdc560f143bb0e0a8c9fb7aa57e69698"

  def install
    system "make", "CC=#{ENV.cc}",
                   "CFLAGS=#{ENV.cflags}",
                   "LDFLAGS=-lz"
    bin.install "bcrypt"
    man1.install gzip("bcrypt.1")
  end

  test do
    (testpath/"test.txt").write("Hello World!")
    pipe_output("#{bin}/bcrypt -r test.txt", "12345678\n12345678\n")
    mv "test.txt.bfe", "test.out.txt.bfe"
    pipe_output("#{bin}/bcrypt -r test.out.txt.bfe", "12345678\n")
    assert_equal File.read("test.txt"), File.read("test.out.txt")
  end
end
{'fraction_non_alphanumeric': 0.1657559198542805, 'fraction_numerical': 0.07103825136612021, 'mean_word_length': 2.9963636363636366, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '6241410', 'n_tokens_mistral': 481, 'n_tokens_neox': 430, 'n_words': 64}