2 # make sure we get proper diagnostics: e.g., with --target-dir=d but no args
4 if test "$VERBOSE" = yes; then
9 # Make sure we get English translations.
10 .
$srcdir/..
/lang-default
14 trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0
15 trap 'exit $?' 1 2 13 15
18 mkdir
$tmp || framework_failure
=1
19 cd $tmp || framework_failure
=1
21 touch f1 || framework_failure
=1
22 touch f2 || framework_failure
=1
23 touch d || framework_failure
=1
25 if test $framework_failure = 1; then
26 echo 'failure in testing framework'
30 # These mv commands should all exit nonzero.
32 # Too few args. This first one did fail, but with an incorrect diagnostic
33 # until fileutils-4.0u.
34 mv --target=d
>> out
2>&1 && fail
=1
35 mv no-file
>> out
2>&1 && fail
=1
37 # Target is not a directory.
38 mv f1 f2 f1
>> out
2>&1 && fail
=1
39 mv --target=f2 f1
>> out
2>&1 && fail
=1
42 mv: missing
file argument
43 Try
`mv --help' for more information.
44 mv: missing file argument
45 Try `mv --help' for more information.
46 mv: when moving multiple files, last argument must be a directory
47 Try `mv --help' for more information.
48 mv: specified target
, `f2' is not a directory
49 Try `mv --help' for more information.