class Justify < Formula desc "Format and justify text to a specified line width" homepage "https://git.sr.ht/~eugenetriguba/justify" url "https://git.sr.ht/~eugenetriguba/justify/archive/v0.2.0.tar.gz" version "0.2.0" sha256 "a319b7fcd2621469ff8d802ce533265e14931592d88fac3cfe7befc4d651daad" license "MIT" depends_on "cmake" => :build depends_on "icu4c" def install system "cmake", "-B", "build", "-DCMAKE_BUILD_TYPE=Release", *std_cmake_args system "cmake", "--build", "build" bin.install "build/justify" man1.install "doc/justify.1" end test do (testpath/"input.txt").write("Hello world") assert_match "Hello world", shell_output("#{bin}/justify < input.txt") end end