<commit_before>class Msgpack < Formula
  desc "Library for a binary-based efficient data interchange format"
  homepage "https://msgpack.org/"
  url "https://github.com/msgpack/msgpack-c/releases/download/cpp-3.0.0/msgpack-3.0.0.tar.gz"
  sha256 "bfbb71b7c02f806393bc3cbc491b40523b89e64f83860c58e3e54af47de176e4"
  head "https://github.com/msgpack/msgpack-c.git"

  bottle do
    sha256 "14d86d3e0c790146175b884c20423ae589b72363922a54fdfc1384b06476b6cc" => :high_sierra
    sha256 "0ed6740916f2d9cb7b4d41139fd258eecdf04d90e0cf6f083167b47cdef20ac4" => :sierra
    sha256 "29e120d663ef5e77160e7abd84b701ed5a0746382373142c5b19e1ea51921496" => :el_capitan
  end

  depends_on "cmake" => :build

  def install
    system "cmake", ".", *std_cmake_args
    system "make", "install"
  end

  test do
    # Reference: https://github.com/msgpack/msgpack-c/blob/master/QUICKSTART-C.md
    (testpath/"test.c").write <<~EOS
      #include <msgpack.h>
      #include <stdio.h>

      int main(void)
      {
         msgpack_sbuffer* buffer = msgpack_sbuffer_new();<commit_msg>msgpack: update 3.0.0 bottle for Linuxbrew.<commit_after>class Msgpack < Formula
  desc "Library for a binary-based efficient data interchange format"
  homepage "https://msgpack.org/"
  url "https://github.com/msgpack/msgpack-c/releases/download/cpp-3.0.0/msgpack-3.0.0.tar.gz"
  sha256 "bfbb71b7c02f806393bc3cbc491b40523b89e64f83860c58e3e54af47de176e4"
  head "https://github.com/msgpack/msgpack-c.git"

  bottle do
    sha256 "14d86d3e0c790146175b884c20423ae589b72363922a54fdfc1384b06476b6cc" => :high_sierra
    sha256 "0ed6740916f2d9cb7b4d41139fd258eecdf04d90e0cf6f083167b47cdef20ac4" => :sierra
    sha256 "29e120d663ef5e77160e7abd84b701ed5a0746382373142c5b19e1ea51921496" => :el_capitan
    sha256 "455b9e6906a0680e2959cea223230f4165ea9f4433f4b917b8f43ce340bb544a" => :x86_64_linux
  end

  depends_on "cmake" => :build

  def install
    system "cmake", ".", *std_cmake_args
    system "make", "install"
  end

  test do
    # Reference: https://github.com/msgpack/msgpack-c/blob/master/QUICKSTART-C.md
    (testpath/"test.c").write <<~EOS
      #include <msgpack.h>
      #include <stdio.h>

      int main(void)
      {
         msgpack_sbuffer* buffer = msgpack_sbuffer_new();
{'fraction_non_alphanumeric': 0.11071587372165406, 'fraction_numerical': 0.19030680302356603, 'mean_word_length': 4.344418052256532, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 16, 'https://': 8, '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': '610890', 'n_tokens_mistral': 1176, 'n_tokens_neox': 951, 'n_words': 125}