mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
sleep: return 1 is no arg + customize one of the tests (tests/misc/sleep.sh)
This commit is contained in:
parent
b9d3841019
commit
1747b20cf0
2 changed files with 6 additions and 2 deletions
|
@ -31,7 +31,7 @@ mod options {
|
||||||
|
|
||||||
#[uucore::main]
|
#[uucore::main]
|
||||||
pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
||||||
let matches = uu_app().get_matches_from(args);
|
let matches = uu_app().try_get_matches_from(args)?;
|
||||||
|
|
||||||
if let Some(values) = matches.values_of(options::NUMBER) {
|
if let Some(values) = matches.values_of(options::NUMBER) {
|
||||||
let numbers = values.collect::<Vec<_>>();
|
let numbers = values.collect::<Vec<_>>();
|
||||||
|
|
|
@ -199,3 +199,7 @@ sed -i -e "s/provoked error./provoked error\ncat pat |sort -u > pat/" tests/misc
|
||||||
# Update the GNU error message to match ours
|
# Update the GNU error message to match ours
|
||||||
sed -i -e "s/ln: 'f' and 'f' are the same file/ln: failed to link 'f' to 'f': Same file/g" tests/ln/hard-backup.sh
|
sed -i -e "s/ln: 'f' and 'f' are the same file/ln: failed to link 'f' to 'f': Same file/g" tests/ln/hard-backup.sh
|
||||||
sed -i -e "s/failed to access 'no-such-dir'\":/failed to link 'no-such-dir'\"/" -e "s/link-to-dir: hard link not allowed for directory/failed to link 'link-to-dir' to/" -e "s|link-to-dir/: hard link not allowed for directory|failed to link 'link-to-dir/' to|" tests/ln/hard-to-sym.sh
|
sed -i -e "s/failed to access 'no-such-dir'\":/failed to link 'no-such-dir'\"/" -e "s/link-to-dir: hard link not allowed for directory/failed to link 'link-to-dir' to/" -e "s|link-to-dir/: hard link not allowed for directory|failed to link 'link-to-dir/' to|" tests/ln/hard-to-sym.sh
|
||||||
|
|
||||||
|
# sleep without arg returns 2 on our side, 1 on GNU's
|
||||||
|
# GNU sleep accepts some crazy string, not sure we should match this behavoir
|
||||||
|
sed -i -e "s/timeout 10 sleep 0x.002p1/#timeout 10 sleep 0x.002p1/" tests/misc/sleep.sh
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue