class Justify < Formula desc "Format and justify text to a specified line width" homepage "https://github.com/eugenetriguba/justify" url "https://github.com/eugenetriguba/justify/archive/refs/tags/v0.1.0.tar.gz" sha256 "4501b45f154c185ef1eb023bf6f0a090336eb2ca2948d328158eafa31a1a0942" license "MIT" depends_on "cmake" => :build 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