-
-
Notifications
You must be signed in to change notification settings - Fork 12.4k
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
class TexFmt < Formula | ||
desc "Extremely fast LaTeX formatter written in Rust" | ||
homepage "https://github.com/WGUNDERWOOD/tex-fmt" | ||
url "https://github.com/WGUNDERWOOD/tex-fmt/archive/refs/tags/v0.4.5.tar.gz" | ||
sha256 "d3c173742645e3228d0cca9f18c7cc39c5dc8d3d0eb9c5cd3925f5cc80d12044" | ||
license "MIT" | ||
head "https://github.com/WGUNDERWOOD/tex-fmt.git", branch: "main" | ||
|
||
depends_on "rust" => :build | ||
|
||
def install | ||
system "cargo", "install", *std_cargo_args | ||
end | ||
|
||
test do | ||
Check failure on line 15 in Formula/t/tex-fmt.rb GitHub Actions / Linux`brew test --verbose tex-fmt` failed on Linux!
Check failure on line 15 in Formula/t/tex-fmt.rb GitHub Actions / macOS 15-arm64`brew test --verbose tex-fmt` failed on macOS Sequoia (15) on Apple Silicon!
Check failure on line 15 in Formula/t/tex-fmt.rb GitHub Actions / macOS 14-arm64`brew test --verbose tex-fmt` failed on macOS Sonoma (14) on Apple Silicon!
Check failure on line 15 in Formula/t/tex-fmt.rb GitHub Actions / macOS 14-x86_64`brew test --verbose tex-fmt` failed on macOS Sonoma (14)!
Check failure on line 15 in Formula/t/tex-fmt.rb GitHub Actions / macOS 13-arm64`brew test --verbose tex-fmt` failed on macOS Ventura (13) on Apple Silicon!
|
||
(testpath/"test.tex").write <<~EOS | ||
\\documentclass{article} | ||
\\title{tex-fmt Homebrew Test} | ||
\\begin{document} | ||
\\maketitle | ||
\\begin{itemize} | ||
\\item Hello | ||
\\item World | ||
\\end{itemize} | ||
\\end{document} | ||
EOS | ||
assert_match <<~EOS, shell_output("#{bin}/tex-fmt #{testpath}/test.tex") | ||
\\documentclass{article} | ||
\\title{tex-fmt Homebrew Test} | ||
\\begin{document} | ||
\\maketitle | ||
\\begin{itemize} | ||
\\item Hello | ||
\\item World | ||
\\end{itemize} | ||
\\end{document} | ||
EOS | ||
end | ||
end |