From 9a6a486e6503520fd2581f2d3356b7149f1b225d Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Tue, 3 Jun 2014 10:50:09 +0100 Subject: 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. --- src/true.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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")) -- cgit v1.2.3-54-g00ecf