4 # Copyright (C) 2014 Sami Kerola <kerolasa@iki.fi>
6 # This file is part of util-linux.
8 # This file is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
13 # This file is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 TS_TOPDIR
="${0%/*}/../.."
21 .
$TS_TOPDIR/functions.sh
24 ts_check_test_command
"$TS_CMD_RENAME"
28 touch rename_exit_codes.
{1.
.2}
29 $TS_CMD_RENAME -v not_a_match impossible rename_exit_codes.?
>> $TS_OUTPUT 2>&1
30 echo "RENAME_EXIT_NOTHING: $?" >> $TS_OUTPUT
32 $TS_CMD_RENAME -v codes values rename_exit_codes.?
>> $TS_OUTPUT 2>&1
33 echo "EXIT_SUCCESS: $?" >> $TS_OUTPUT
35 mkdir rename_exit_codes
.2
36 ts_run
--unbuffered $TS_CMD_RENAME -v values codes rename_exit_values.?
>> $TS_OUTPUT 2>&1
37 echo "RENAME_EXIT_SOMEOK: $?" >> $TS_OUTPUT
39 rmdir rename_exit_codes
.2
40 rm rename_exit_codes.? rename_exit_values.?