mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-04-09 13:51:38 +02:00
These were identified using: https://github.com/lyda/misspell-check executed like: git ls-files | misspellings -f - * src/cat.c: Correct a spelling error. * src/comm.c: Likewise. * src/expr.c: Likewise. * src/pr.c: Likewise. * src/tac.c: Likewise. * src/test.c: Likewise. * src/ChangeLog-2005: Likewise. * src/ChangeLog-2007: Likewise. * src/NEWS: Likewise. * src/doc/coreutils.texi: Likewise. * src/lib/ChangeLog-2007: Likewise. * src/man/help2man: Likewise. * src/old/fileutils/ChangeLog-1997: Likewise. * src/old/fileutils/NEWS: Likewise. * src/old/sh-utils/ChangeLog.0: Likewise. * src/old/textutils/ChangeLog: Likewise. * src/tests/misc/comm: Likewise. * src/tests/misc/uniq: Likewise. * src/tests/mv/dir2dir: Likewise. * src/cfg.mk (old_NEWS_hash): update with `make update-NEWS-hash`
43 lines
1.4 KiB
Bash
Executable File
43 lines
1.4 KiB
Bash
Executable File
#!/bin/sh
|
|
# Ensure that mv prints the right diagnostic for a dir->dir move
|
|
# where the destination directory is not empty.
|
|
|
|
# Copyright (C) 2006-2012 Free Software Foundation, Inc.
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
. "${srcdir=.}/init.sh"; path_prepend_ ../src
|
|
print_ver_ mv
|
|
|
|
mkdir -p a/t b/t || framework_failure_
|
|
touch a/t/f || framework_failure_
|
|
|
|
|
|
# Expect this to fail with the expected diagnostic.
|
|
# For an interim (pre-6.0) release, it would give an erroneous
|
|
# diagnostic about moving one directory to a subdirectory of itself.
|
|
mv b/t a 2> out && fail=1
|
|
|
|
# Accept any of these: EEXIST, ENOTEMPTY, EBUSY.
|
|
sed 's/: File exists/: Directory not empty/'<out>o1;mv o1 out
|
|
sed 's/: Device or resource busy/: Directory not empty/'<out>o1;mv o1 out
|
|
|
|
cat <<\EOF > exp || fail=1
|
|
mv: cannot move 'b/t' to 'a/t': Directory not empty
|
|
EOF
|
|
|
|
compare exp out || fail=1
|
|
|
|
Exit $fail
|