diff options
Diffstat (limited to 'tests/cp.test')
-rwxr-xr-x | tests/cp.test | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/tests/cp.test b/tests/cp.test index 43272565..2b89e2f2 100755 --- a/tests/cp.test +++ b/tests/cp.test @@ -7,45 +7,45 @@ dd if=/dev/urandom of=random bs=64 count=1 2> /dev/null #testing "name" "command" "result" "infile" "stdin" -testing "cp not enough arguments [fail]" "cp one 2>/dev/null || echo yes" \ +testing "not enough arguments [fail]" "cp one 2>/dev/null || echo yes" \ "yes\n" "" "" -testing "cp -missing source [fail]" "cp missing two 2>/dev/null || echo yes" \ +testing "-missing source [fail]" "cp missing two 2>/dev/null || echo yes" \ "yes\n" "" "" -testing "cp file->file" "cp random two && cmp random two && echo yes" \ +testing "file->file" "cp random two && cmp random two && echo yes" \ "yes\n" "" "" rm two mkdir two -testing "cp file->dir" "cp random two && cmp random two/random && echo yes" \ +testing "file->dir" "cp random two && cmp random two/random && echo yes" \ "yes\n" "" "" rm two/random -testing "cp file->dir/file" \ +testing "file->dir/file" \ "cp random two/random && cmp random two/random && echo yes" \ "yes\n" "" "" -testing "cp -r dir->missing" \ +testing "-r dir->missing" \ "cp -r two three && cmp random three/random && echo yes" \ "yes\n" "" "" touch walrus -testing "cp -r dir->file [fail]" \ +testing "-r dir->file [fail]" \ "cp -r two walrus 2>/dev/null || echo yes" "yes\n" "" "" touch two/three -testing "cp -r dir hits file." \ +testing "-r dir hits file." \ "cp -r three two 2>/dev/null || echo yes" "yes\n" "" "" rm -rf two three walrus touch two chmod 000 two -testing "cp file->inaccessable [fail]" \ +testing "file->inaccessable [fail]" \ "cp random two 2>/dev/null || echo yes" "yes\n" "" "" rm -f two touch two chmod 000 two -testing "cp -f file->inaccessable" \ +testing "-f file->inaccessable" \ "cp -f random two && cmp random two && echo yes" "yes\n" "" "" mkdir sub chmod 000 sub -testing "cp file->inaccessable_dir [fail]" \ +testing "file->inaccessable_dir [fail]" \ "cp random sub 2>/dev/null || echo yes" "yes\n" "" "" rm two rmdir sub @@ -56,21 +56,21 @@ rmdir sub #mkdir dir #touch file -#testing "cp -rf dir file [fail]" "cp -rf dir file 2>/dev/null || echo yes" \ +#testing "-rf dir file [fail]" "cp -rf dir file 2>/dev/null || echo yes" \ # "yes\n" "" "" #rm -rf dir file touch one two -testing "cp file1 file2 missing [fail]" \ +testing "file1 file2 missing [fail]" \ "cp one two missing 2>/dev/null || echo yes" "yes\n" "" "" mkdir dir -testing "cp dir file missing [fail]" \ +testing "dir file missing [fail]" \ "cp dir two missing 2>/dev/null || echo yes" "yes\n" "" "" -testing "cp -rf dir file missing [fail]" \ +testing "-rf dir file missing [fail]" \ "cp dir two missing 2>/dev/null || echo yes" "yes\n" "" "" -testing "cp file1 file2 file [fail]" \ +testing "file1 file2 file [fail]" \ "cp random one two 2>/dev/null || echo yes" "yes\n" "" "" -testing "cp file1 file2 dir" \ +testing "file1 file2 dir" \ "cp random one dir && cmp random dir/random && cmp one dir/one && echo yes" \ "yes\n" "" "" rm one two random @@ -79,13 +79,13 @@ rm -rf dir mkdir -p one/two/three/four touch one/two/three/five touch one/{six,seven,eight} -testing "cp -r /abspath dest" \ +testing "-r /abspath dest" \ "cp -r \"$(readlink -f one)\" dir && diff -r one dir && echo yes" \ "yes\n" "" "" -testing "cp -r dir again" "cp -r one/. dir && diff -r one dir && echo yes" \ +testing "-r dir again" "cp -r one/. dir && diff -r one dir && echo yes" \ "yes\n" "" "" mkdir dir2 -testing "cp -r dir1/* dir2" \ +testing "-r dir1/* dir2" \ "cp -r one/* dir2 && diff -r one dir2 && echo yes" "yes\n" "" "" rm -rf one dir dir2 |