mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
yes: fix copy and paste issue with previous commit
* src/yes.c (main): Output 'y' not '-'. * tests/misc/yes.sh: Add a test for default output.
This commit is contained in:
1 parent
818b2f4897
commit
ba5767c2b8
2 files changed
+4
-1
No files matched your search
@@ -76,7 +76,7 @@ main (int argc, char **argv)
|
||||
|
||||
char **operand_lim = argv + argc;
|
||||
if (optind == argc)
|
||||
*operand_lim++ = bad_cast ("-");
|
||||
*operand_lim++ = bad_cast ("y");
|
||||
|
||||
/* Buffer data locally once, rather than having the
|
||||
large overhead of stdio buffering each item. */
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
|
||||
print_ver_ yes
|
||||
|
||||
# Check basic operation
|
||||
test "$(yes | head -n1)" = 'y' || fail=1
|
||||
|
||||
# Check various single item sizes, with the most important
|
||||
# size being BUFSIZ used for the local buffer to yes(1).
|
||||
# Note a \n is added, so actual sizes required internally
|
||||
|
||||
Reference in new issue
Block a user