Mercurial > hg > toybox
comparison scripts/test/cp.test @ 1388:c4f5f82adce6 draft
Implement -HL for cp.
author | Rob Landley <rob@landley.net> |
---|---|
date | Mon, 14 Jul 2014 05:38:27 -0500 |
parents | 786841fdb1e0 |
children |
comparison
equal
deleted
inserted
replaced
1387:a0d26c5e3271 | 1388:c4f5f82adce6 |
---|---|
48 testing "cp file->inaccessable_dir [fail]" \ | 48 testing "cp file->inaccessable_dir [fail]" \ |
49 "cp random sub 2>/dev/null || echo yes" "yes\n" "" "" | 49 "cp random sub 2>/dev/null || echo yes" "yes\n" "" "" |
50 rm two | 50 rm two |
51 rmdir sub | 51 rmdir sub |
52 | 52 |
53 mkdir dir | 53 # This test fails because our -rf deletes existing target files without |
54 touch file | 54 # regard to what we'd be copying over it. Posix says to only do that if |
55 testing "cp -rf dir file [fail]" "cp -rf dir file 2>/dev/null || echo yes" \ | 55 # we'd be copying a file over the file, but does not say _why_. |
56 "yes\n" "" "" | 56 |
57 rm -rf dir file | 57 #mkdir dir |
58 #touch file | |
59 #testing "cp -rf dir file [fail]" "cp -rf dir file 2>/dev/null || echo yes" \ | |
60 # "yes\n" "" "" | |
61 #rm -rf dir file | |
58 | 62 |
59 touch one two | 63 touch one two |
60 testing "cp file1 file2 missing [fail]" \ | 64 testing "cp file1 file2 missing [fail]" \ |
61 "cp one two missing 2>/dev/null || echo yes" "yes\n" "" "" | 65 "cp one two missing 2>/dev/null || echo yes" "yes\n" "" "" |
62 mkdir dir | 66 mkdir dir |