Skip to content

Commit

Permalink
Merge pull request Homebrew#203223 from Homebrew/gnu-getopt-updates
Browse files Browse the repository at this point in the history
gnu-getopt: update Linux keg_only message, test with shell_output
  • Loading branch information
chenrui333 authored Jan 4, 2025
2 parents bda79b9 + 473ba20 commit d366b75
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Formula/g/gnu-getopt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class GnuGetopt < Formula
keg_only :shadowed_by_macos, "macOS provides BSD getopt"

on_linux do
keg_only "conflicts with util-linux"
keg_only "it conflicts with util-linux"
end

def install
Expand All @@ -63,9 +63,9 @@ def install
end

test do
system bin/"getopt", "-o", "--test"
output = shell_output("#{bin}/getopt --longoptions foo --options ab:c test -b bar --foo baz")
assert_equal " -b 'bar' --foo -- 'test' 'baz'\n", output
# Check that getopt is enhanced
quiet_system bin/"getopt", "-T"
assert_equal 4, $CHILD_STATUS.exitstatus
assert_empty shell_output("#{bin}/getopt --test", 4)
end
end

0 comments on commit d366b75

Please sign in to comment.