From 4cf1cb514aeb1455272b81ce38f3c777d239c303 Mon Sep 17 00:00:00 2001 From: LanikSJ Date: Sun, 5 Nov 2023 21:50:34 -0800 Subject: [PATCH] Add Conflicts, Tests, Depends for LSUSB (#33) * Add Conflicts for LSUSB * Add Tests and Depends On --- Formula/lsusb-plus.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Formula/lsusb-plus.rb b/Formula/lsusb-plus.rb index b420139..668b44a 100644 --- a/Formula/lsusb-plus.rb +++ b/Formula/lsusb-plus.rb @@ -6,8 +6,18 @@ class LsusbPlus < Formula license "MIT" head "https://github.com/LanikSJ/lsusb", using: :git + depends_on :macos + + conflicts_with "lsusb", because: "both provide an `lsusb` binary" + conflicts_with "usbutils", because: "both provide an `lsusb` binary" + def install bin.install "lsusb" man8.install "man/lsusb.8" end + + test do + output = shell_output("#{bin}/lsusb") + assert_match(/^Bus [0-9]+ Device [0-9]+:/, output) + end end