* src/timeout.c (main): Add short option character 'v' to getopt_long
call.
* tests/misc/timeout.sh: Run the test both for the long and the short
option.
initialize_exit_failure (EXIT_CANCELED);
atexit (close_stdout);
- while ((c = getopt_long (argc, argv, "+k:s:", long_options, NULL)) != -1)
+ while ((c = getopt_long (argc, argv, "+k:s:v", long_options, NULL)) != -1)
{
switch (c)
{
test "$out" = "" && test $status = 124 || fail=1
# Verify --verbose output
-timeout --verbose -s0 -k .1 .1 sleep 10 2> err
cat > exp <<\EOF
timeout: sending signal EXIT to command 'sleep'
timeout: sending signal KILL to command 'sleep'
EOF
-compare exp err || fail=1
+for opt in -v --verbose; do
+ timeout $opt -s0 -k .1 .1 sleep 10 2> err
+ compare exp err || fail=1
+done
Exit $fail