Skip to content

Commit d366b75

Browse files
authored
Merge pull request Homebrew#203223 from Homebrew/gnu-getopt-updates
gnu-getopt: update Linux keg_only message, test with shell_output
2 parents bda79b9 + 473ba20 commit d366b75

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Formula/g/gnu-getopt.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class GnuGetopt < Formula
4646
keg_only :shadowed_by_macos, "macOS provides BSD getopt"
4747

4848
on_linux do
49-
keg_only "conflicts with util-linux"
49+
keg_only "it conflicts with util-linux"
5050
end
5151

5252
def install
@@ -63,9 +63,9 @@ def install
6363
end
6464

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

0 commit comments

Comments
 (0)