<commit_before>class Wasm3 < Formula
  desc "High performance WebAssembly interpreter"
  homepage "https://github.com/wasm3/wasm3"
  url "https://github.com/wasm3/wasm3/archive/v0.4.8.tar.gz"
  sha256 "75a1736d4616e3463b29eece86ca4f03b687503bee81601381aba91e0119ea68"
  license "MIT"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_big_sur: "a89be08c7ff241a0a624161b333d9d08c3ebd4539fb4499d2fa96bb5a5c5e31d"
    sha256 cellar: :any_skip_relocation, big_sur:       "296862636f23bda386da3d469e6bd22e79959203d8960e457777e7ea88952978"
    sha256 cellar: :any_skip_relocation, catalina:      "94625f80433b1af43daba906cc715d78891e202f92d323fae9164efbc2fa76ed"
    sha256 cellar: :any_skip_relocation, mojave:        "e7aac098bda9f38e0f10778b82bcd0b08e88f7834d9a0e511dc6d4f7536ae74d"
  end

  depends_on "cmake" => :build

  def install
    mkdir "build" do
      system "cmake", "..", *std_cmake_args
      system "cmake", "--build", "."
      bin.install "wasm3"
    end
    # fib32.wasm is used for testing
    prefix.install "test/lang/fib32.wasm"
  end

  test do<commit_msg>wasm3 0.4.9<commit_after>class Wasm3 < Formula
  desc "High performance WebAssembly interpreter"
  homepage "https://github.com/wasm3/wasm3"
  url "https://github.com/wasm3/wasm3/archive/v0.4.9.tar.gz"
  sha256 "4a09c118fae597db046bddad5734cc536a47f9afd333855789bda6955d08a617"
  license "MIT"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_big_sur: "a89be08c7ff241a0a624161b333d9d08c3ebd4539fb4499d2fa96bb5a5c5e31d"
    sha256 cellar: :any_skip_relocation, big_sur:       "296862636f23bda386da3d469e6bd22e79959203d8960e457777e7ea88952978"
    sha256 cellar: :any_skip_relocation, catalina:      "94625f80433b1af43daba906cc715d78891e202f92d323fae9164efbc2fa76ed"
    sha256 cellar: :any_skip_relocation, mojave:        "e7aac098bda9f38e0f10778b82bcd0b08e88f7834d9a0e511dc6d4f7536ae74d"
  end

  depends_on "cmake" => :build

  def install
    mkdir "build" do
      system "cmake", "..", *std_cmake_args
      system "cmake", "--build", "."
      bin.install "wasm3"
    end
    # fib32.wasm is used for testing
    prefix.install "test/lang/fib32.wasm"
  end

  test do
{'fraction_non_alphanumeric': 0.08763837638376384, 'fraction_numerical': 0.2172509225092251, 'mean_word_length': 4.619170984455959, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, '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': '6838594', 'n_tokens_mistral': 1190, 'n_tokens_neox': 944, 'n_words': 132}