toml-test 1.2.0 (new formula)

Closes #111109.

Signed-off-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
Signed-off-by: Rui Chen <rui@chenrui.dev>
Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
master
Sebastian Ehlert 2022-09-19 11:56:33 +02:00 committed by BrewTestBot
parent e4d967dd15
commit 06f5ed721d
No known key found for this signature in database
GPG Key ID: 82D7D104050B0F0F
1 changed files with 27 additions and 0 deletions

27
Formula/toml-test.rb Normal file
View File

@ -0,0 +1,27 @@
class TomlTest < Formula
desc "Language agnostic test suite for TOML parsers"
homepage "https://github.com/burntsushi/toml-test"
url "https://github.com/BurntSushi/toml-test/archive/refs/tags/v1.2.0.tar.gz"
sha256 "33bf4e9c017cd57f3602e72d17f75fb5a7bcc7942541c84f1d98b74c12499846"
license "MIT"
depends_on "go" => :build
def install
system "go", "build", *std_go_args, "./cmd/toml-test"
pkgshare.install "tests"
end
test do
system bin/"toml-test", "-version"
system bin/"toml-test", "-help"
(testpath/"stub-decoder").write <<~EOS
#!/bin/sh
cat #{pkgshare}/tests/valid/example.json
EOS
chmod 0755, testpath/"stub-decoder"
system bin/"toml-test", "-testdir", pkgshare/"tests",
"-run", "valid/example*",
"--", testpath/"stub-decoder"
end
end