<commit_before>class Vile < Formula
  desc "Vi Like Emacs Editor"
  homepage "https://invisible-island.net/vile/"
  url "https://invisible-island.net/archives/vile/current/vile-9.8w.tgz"
  sha256 "78253ec3f7ae5f4f9d4799a3c8bc35b85b47d456f2ac172810008a48e4609815"
  license "GPL-2.0-or-later"

  bottle do
    sha256 arm64_monterey: "2f8b35eb4e569fb97eb705f0e289533f87e760d33bc713dd734d0d5ec4b6c1b1"
    sha256 arm64_big_sur:  "2911233eefb048ba942d43900e0f5fa016afc73aa9ba8cda4cbefaf20e0671e3"
    sha256 monterey:       "6afae967ea6dc6887aee00131e940e82c545893021e24f80841f99271fab6bb6"
    sha256 big_sur:        "278f63fe15bda365d971a13f0243ea324362427d4c54e7fcd309b37ced9f3e6b"
    sha256 catalina:       "7fb308e8e8519b0c57b9d445acb18391a9f8fada7057e2f1efb47e44c58d4a63"
    sha256 x86_64_linux:   "0fa6c246dd0732fc76dbab86f9ecc4eeea16f58ada44a7638893655e16c38015"
  end

  uses_from_macos "flex" => :build
  uses_from_macos "groff" => :build
  uses_from_macos "expect" => :test
  uses_from_macos "libxcrypt"
  uses_from_macos "ncurses"
  uses_from_macos "perl"

  def install
    system "./configure", *std_configure_args,
                          "--disable-imake",
                          "--enable-colored-menus",
                          "--with-ncurses",
                          "--without-x",
                          "--with-screen=ncurses"
    system "make", "install"
  end

  test do
    ENV["TERM"] = "xterm"
    (testpath/"vile.exp").write <<~EOS
      spawn #{bin}/vile
      expect "unnamed"
      send ":w new\r:q\r"
      expect eof<commit_msg>vile: update 9.8w bottle.<commit_after>class Vile < Formula
  desc "Vi Like Emacs Editor"
  homepage "https://invisible-island.net/vile/"
  url "https://invisible-island.net/archives/vile/current/vile-9.8w.tgz"
  sha256 "78253ec3f7ae5f4f9d4799a3c8bc35b85b47d456f2ac172810008a48e4609815"
  license "GPL-2.0-or-later"

  bottle do
    sha256 arm64_monterey: "0036bd77eb9f1231343f6e21793d6c3b1df01d014411b794aa289e621350a2ac"
    sha256 arm64_big_sur:  "440c832f9fb4513eea1800a0b1f22a7afae03f48f96d03478d78d731a76a84a0"
    sha256 monterey:       "4548060b0cf5731b7f4b6fc0eb95b33ea2a446decd83b5bfc946f354728d703b"
    sha256 big_sur:        "cda465c26af587b967d18c93061c25adc6cf0e356d5fee5bf172e8b671b47eea"
    sha256 catalina:       "b7b693bde291c3bdd649bfc2129aaeabf0c2e8edca732a458e427efcffcf3b28"
    sha256 x86_64_linux:   "bc15ead3a90e2e171890caa044d5279b54a017b7fb1bb7d83eaeccbb3f0e671e"
  end

  uses_from_macos "flex" => :build
  uses_from_macos "groff" => :build
  uses_from_macos "expect" => :test
  uses_from_macos "libxcrypt"
  uses_from_macos "ncurses"
  uses_from_macos "perl"

  def install
    system "./configure", *std_configure_args,
                          "--disable-imake",
                          "--enable-colored-menus",
                          "--with-ncurses",
                          "--without-x",
                          "--with-screen=ncurses"
    system "make", "install"
  end

  test do
    ENV["TERM"] = "xterm"
    (testpath/"vile.exp").write <<~EOS
      spawn #{bin}/vile
      expect "unnamed"
      send ":w new\r:q\r"
      expect eof
{'fraction_non_alphanumeric': 0.09474017743979721, 'fraction_numerical': 0.19391634980988592, 'mean_word_length': 3.1, 'pattern_counts': {'":': 2, '<': 9, '<?xml version=': 0, '>': 9, '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': '5773248', 'n_tokens_mistral': 1656, 'n_tokens_neox': 1354, 'n_words': 164}