2 desc "Enrich `go test` outputs with text decorations"
3 homepage "https://github.com/kyoh86/richgo"
4 url "https://github.com/kyoh86/richgo/archive/refs/tags/v0.3.12.tar.gz"
5 sha256 "811db92c36818be053fa3950d40f8cca13912b8a4a9f54b82a63e2f112d2c4fe"
7 head "https://github.com/kyoh86/richgo.git", branch: "main"
11 sha256 cellar: :any_skip_relocation, arm64_sequoia: "967353f6b2bfa1c35a96f76eb85b98d3e6ea91d8b424a2655e80ab957884591b"
12 sha256 cellar: :any_skip_relocation, arm64_sonoma: "967353f6b2bfa1c35a96f76eb85b98d3e6ea91d8b424a2655e80ab957884591b"
13 sha256 cellar: :any_skip_relocation, arm64_ventura: "967353f6b2bfa1c35a96f76eb85b98d3e6ea91d8b424a2655e80ab957884591b"
14 sha256 cellar: :any_skip_relocation, sonoma: "31d3f488ac0adb8874295408a1ea9c56acfbf9a90484d90b3e34d76ffcf20927"
15 sha256 cellar: :any_skip_relocation, ventura: "31d3f488ac0adb8874295408a1ea9c56acfbf9a90484d90b3e34d76ffcf20927"
16 sha256 cellar: :any_skip_relocation, x86_64_linux: "da63b93248cf2292a4c287cc5973c39eded1d3c349ebfba315b3913883045d3c"
19 depends_on "go" => [:build, :test]
22 system "go", "build", *std_go_args(ldflags: "-s -w")
26 (testpath/"go.mod").write <<~GOMOD
27 module github.com/Homebrew/brew-test
32 (testpath/"main.go").write <<~GO
38 return "Hello, gotestsum."
46 (testpath/"main_test.go").write <<~GO
51 func TestHello(t *testing.T) {
53 want := "Hello, gotestsum."
55 t.Errorf("got %q, want %q", got, want)
60 output = shell_output("#{bin}/richgo test ./...")
63 "PASS | github.com/Homebrew/brew-test"
65 "ok \tgithub.com/Homebrew/brew-test"
67 assert_match expected, output