[BusyBox-cvs] busybox/testsuite/mv mv-files-to-dir, NONE, 1.1 mv-follows-links, NONE, 1.1 mv-moves-empty-file, NONE, 1.1 mv-moves-hardlinks, NONE, 1.1 mv-moves-large-file, NONE, 1.1 mv-moves-small-file, NONE, 1.1 mv-moves-symlinks, NONE, 1.1 mv-moves-unreadable-files, NONE, 1.1 mv-preserves-hard-links, NONE, 1.1 mv-preserves-links, NONE, 1.1 mv-refuses-mv-dir-to-subdir, NONE, 1.1 mv-removes-source-file, NONE, 1.1

Erik Andersen andersen at busybox.net
Tue Apr 6 11:10:13 UTC 2004


Update of /var/cvs/busybox/testsuite/mv
In directory nail:/tmp/cvs-serv13250/testsuite/mv

Added Files:
	mv-files-to-dir mv-follows-links mv-moves-empty-file 
	mv-moves-hardlinks mv-moves-large-file mv-moves-small-file 
	mv-moves-symlinks mv-moves-unreadable-files 
	mv-preserves-hard-links mv-preserves-links 
	mv-refuses-mv-dir-to-subdir mv-removes-source-file 
Log Message:
Kill off the old 'tests' stuff.  Write a ton of new tests for the
'testsuite' dir.  Fix a bunch of broken tests.  Fix the testsuite
'runtest' script so it actually reports all failures and provides
meaningful feedback.
 -Erik


--- NEW FILE: mv-moves-empty-file ---
touch foo
busybox mv foo bar
test ! -e foo
test -f bar

--- NEW FILE: mv-moves-unreadable-files ---
touch foo
chmod a-r foo
busybox mv foo bar
test ! -e foo
test -f bar

--- NEW FILE: mv-moves-large-file ---
dd if=/dev/zero of=foo seek=10k count=1 2>/dev/null
busybox mv foo bar
test ! -e foo
test -f bar

--- NEW FILE: mv-preserves-hard-links ---
# FEATURE: CONFIG_FEATURE_PRESERVE_HARDLINKS
touch foo
ln foo bar
mkdir baz
busybox mv foo bar baz
test baz/foo -ef baz/bar

--- NEW FILE: mv-refuses-mv-dir-to-subdir ---
echo file number one > file1
echo file number two > file2
ln -s file2 link1
mkdir dir1
touch --date='Sat Jan 29 21:24:08 PST 2000' dir1/file3
mkdir there
busybox mv file1 file2 link1 dir1 there
test -f there/file1
test -f there/file2
test -f there/dir1/file3
test -L there/link1
test xfile2 = x`readlink there/link1`
test ! -e file1
test ! -e file2
test ! -e link1
test ! -e dir1/file3
set +e
busybox mv there there/dir1
if [ $? != 0 ] ; then
	exit 0;
fi

exit 1;

--- NEW FILE: mv-moves-hardlinks ---
touch foo
ln foo bar
busybox mv bar baz
test ! -f bar -a -f baz

--- NEW FILE: mv-removes-source-file ---
touch foo
busybox mv foo bar
test ! -e foo
test -f bar

--- NEW FILE: mv-preserves-links ---
touch foo
ln -s foo bar
busybox mv bar baz
test -L baz
test xfoo = x`readlink baz`

--- NEW FILE: mv-follows-links ---
touch foo
ln -s foo bar
busybox mv bar baz
test -f baz

--- NEW FILE: mv-moves-symlinks ---
touch foo
ln -s foo bar
busybox mv bar baz
test -f foo
test ! -e bar
test -L baz

--- NEW FILE: mv-moves-small-file ---
echo I WANT > foo
busybox mv foo bar
test ! -e foo
test -f bar

--- NEW FILE: mv-files-to-dir ---
echo file number one > file1
echo file number two > file2
ln -s file2 link1
mkdir dir1
touch --date='Sat Jan 29 21:24:08 PST 2000' dir1/file3
mkdir there
busybox mv file1 file2 link1 dir1 there
test -f there/file1
test -f there/file2
test -f there/dir1/file3
test -L there/link1
test xfile2 = x`readlink there/link1`
test ! -e file1
test ! -e file2
test ! -e link1
test ! -e dir1/file3




More information about the busybox-cvs mailing list