Skip to content

Commit

Permalink
Merge pull request uutils#4987 from sylvestre/help-version-getopt
Browse files Browse the repository at this point in the history
Make tests/help/help-version-getopt.sh pass
  • Loading branch information
cakebaker committed Jun 21, 2023
2 parents 8debc96 + 01af46e commit a18bf4b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/by-util/test_yes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}

#[test]
fn test_version() {
new_ucmd!().arg("--version").succeeds();
}

#[test]
fn test_simple() {
run(NO_ARGS, b"y\ny\ny\ny\n");
Expand Down
5 changes: 5 additions & 0 deletions util/build-gnu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -232,3 +232,8 @@ sed -i -e "s/Try 'mv --help' for more information/For more information, try '--h
sed -i -E "s|^([^#]*2_31.*)$|#\1|g" tests/misc/printf-cov.pl

sed -i -e "s/du: invalid -t argument/du: invalid --threshold argument/" -e "s/du: option requires an argument/error: a value is required for '--threshold <SIZE>' but none was supplied/" -e "/Try 'du --help' for more information./d" tests/du/threshold.sh

# disable two kind of tests:
# "hostid BEFORE --help" doesn't fail for GNU. we fail. we are probably doing better
# "hostid BEFORE --help AFTER " same for this
sed -i -e "s/env \$prog \$BEFORE \$opt > out2/env \$prog \$BEFORE \$opt > out2 #/" -e "s/env \$prog \$BEFORE \$opt AFTER > out3/env \$prog \$BEFORE \$opt AFTER > out3 #/" -e "s/compare exp out2/compare exp out2 #/" -e "s/compare exp out3/compare exp out3 #/" tests/misc/help-version-getopt.sh

0 comments on commit a18bf4b

Please sign in to comment.