summaryrefslogtreecommitdiff
path: root/src/true.c
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2014-06-03 10:50:09 +0100
committerPádraig Brady <P@draigBrady.com>2014-06-03 18:39:57 +0100
commit9a6a486e6503520fd2581f2d3356b7149f1b225d (patch)
tree8752754ae8780de8ceb4d2ab1113d8b74faef77c /src/true.c
parent1239ac573df0a699d6999aed23caaf4a0eb099df (diff)
downloadcoreutils-9a6a486e6503520fd2581f2d3356b7149f1b225d.tar.gz
tests: consolidate tests for true and false
* src/true.c (main): Add a comment about the possibility of true returning EXIT_FAILURE due to write failure. * tests/misc/false-status.sh: Fix so we're testing the tool and not the shell builtin. Add a case for true(1). * tests/misc/help-version.sh: Skip /dev/full test for true as well as false since the exit status is tested separately. Also remove the iterations for different LC_MESSAGES, as this was only applied for false(1). Translations are not honored in the test dir and so would need separate handling in any case.
Diffstat (limited to 'src/true.c')
-rw-r--r--src/true.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/true.c b/src/true.c
index 219f98c86..8a1c4f920 100644
--- a/src/true.c
+++ b/src/true.c
@@ -64,6 +64,8 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+ /* Note true(1) will return EXIT_FAILURE in the
+ edge case where writes fail with GNU specific options. */
atexit (close_stdout);
if (STREQ (argv[1], "--help"))