<commit_before>require 'formula'

class Hfsutils < Formula
  homepage 'http://www.mars.org/home/rob/proj/hfs/'
  url 'ftp://ftp.mars.org/pub/hfs/hfsutils-3.2.6.tar.gz'
  sha1 '6d71dfb2c93c0d8082972d39f3f75ae53a438d5d'

  def install
    system "./configure", "--prefix=#{prefix}", "--mandir=#{man}"
    bin.mkpath
    man1.mkpath
    system "make install"
  end
end<commit_msg>hfsutils: fix audit, add test.<commit_after>class Hfsutils < Formula
  homepage "http://www.mars.org/home/rob/proj/hfs/"
  url "ftp://ftp.mars.org/pub/hfs/hfsutils-3.2.6.tar.gz"
  sha256 "bc9d22d6d252b920ec9cdf18e00b7655a6189b3f34f42e58d5bb152957289840"

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

  test do
    system "dd", "if=/dev/zero", "of=disk.hfs", "bs=1k", "count=800"
    system bin/"hformat", "-l", "Test Disk", "disk.hfs"
    output = shell_output("#{bin}/hmount disk.hfs")
    assert_match /^Volume name is "Test Disk"$/, output
    assert_match /^Volume has 803840 bytes free$/, output
  end
end
{'fraction_non_alphanumeric': 0.16804407713498623, 'fraction_numerical': 0.08264462809917356, 'mean_word_length': 3.6382978723404253, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '6771216', 'n_tokens_mistral': 494, 'n_tokens_neox': 441, 'n_words': 81}