<commit_before>require 'formula'

class Kdiff3 < Formula
  homepage 'http://kdiff3.sourceforge.net/'
  url 'http://downloads.sourceforge.net/project/kdiff3/kdiff3/0.9.97/kdiff3-0.9.97.tar.gz'
  sha1 '1f2828c4b287b905bac64992b46a3e9231319547'

  depends_on 'qt'

  def install
    # configure builds the binary
    system "./configure", "qt4"
    prefix.install "releaseQt/kdiff3.app"
    bin.install_symlink prefix+"kdiff3.app/Contents/MacOS/kdiff3"
  end
  end
end<commit_msg>kdiff3: add test.<commit_after>require 'formula'

class Kdiff3 < Formula
  homepage 'http://kdiff3.sourceforge.net/'
  url 'http://downloads.sourceforge.net/project/kdiff3/kdiff3/0.9.97/kdiff3-0.9.97.tar.gz'
  sha1 '1f2828c4b287b905bac64992b46a3e9231319547'

  depends_on 'qt'

  def install
    # configure builds the binary
    system "./configure", "qt4"
    prefix.install "releaseQt/kdiff3.app"
    bin.install_symlink prefix+"kdiff3.app/Contents/MacOS/kdiff3"
  end

  test do
    (testpath/"test1.in").write "test"
    (testpath/"test2.in").write "test"
    system "#{bin}/kdiff3", "--auto", "test1.in", "test2.in", "-o", "test.out"
    assert (testpath/"test.out").exist?
  end
end
{'fraction_non_alphanumeric': 0.14665523156089194, 'fraction_numerical': 0.08747855917667238, 'mean_word_length': 3.822314049586777, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4194368', 'n_tokens_mistral': 506, 'n_tokens_neox': 464, 'n_words': 74}