Fossil SCM
More tests, part 1.
Commit
cdd2ede6a20464a028d1c5657a00cdf3eec4e3a0
Parent
d272a35d26cdc09…
1 file changed
+77
+77
| --- a/test/mv-rm.test | ||
| +++ b/test/mv-rm.test | ||
| @@ -0,0 +1,77 @@ | ||
| 1 | + m | |
| 2 | +test_cleanup | |
| 3 | +REVERT f1\nDELETE subdir1/f1REVERT f2\nDELETE subdir2/f2 m | |
| 4 | +test_cleanup | |
| 5 | +REVERT f4\nDELETE subdir4/REVERT f5\nREVERT f6\nDELETE subdir6/ m | |
| 6 | +test_cleanREVERT f8\nDELETE subdir8/DELETE subdir1/f1\nREVERT fDELETE subdir2/f2\nDELETE subdir3/f3\nREVERT f3DELETE subdir4/f4\nDELETE 5/f5\nREVERT f5DELETE subdir6/f6\nREVERT f6 m | |
| 7 | +test_cleanup | |
| 8 | +REVERT f1\nDELETE subdir1/f1REVERT f2\nDELETE subdir2/f2 m | |
| 9 | +test_cleanup | |
| 10 | +REVERT f4\nDELETE subdir4/REVERT f5\nREVERT f6\nDELETE subdir6/ m | |
| 11 | +test_cleanREVERT f8\nDELETE subdir8/nDELETE scatch {eputs res=$h {exec $::fossilexe info} res | |
| 12 | +if {![regexp {use --repository} $res]} { | |
| 13 | + puts stderr "Cannot run this test within an open checkout" | |
| 14 | + return | |
| 15 | +}p | |
| 16 | +repo_initrepo_init: subdir1/f1\nREVERTED: f:ED:res]} { | |
| 17 | + puts stderr "Cannot run this test within an open checkout" | |
| 18 | + return | |
| 19 | +}p | |
| 20 | +repo_initrepo_init:ED: f3: subdir4/f4\nREVERTED: f4: subdir5/f5\nREVERTED: f5: subdir6/f6\nREVERTED: f6: subdir7/f7\nREVERTED: f7: subdir8/f8ED: f8ED: subdirB/f9\nREVERTED:ED:ED:ED: subdirB/f9\nREVERTED:ED:ED: f413REVERT f4\nDE m | |
| 21 | +test_cleanup | |
| 22 | +REVERT f1\nDELETE subdir1/f1REVERT fT f6 m | |
| 23 | +test_cleanup | |
| 24 | +REVERT ED: ubdirB/f9\nREVERTED:ED:6REVERT f4\nDE 8] f6\nDELETE subdir6/ m | |
| 25 | +test_cleanREVERT f8\nDELETE subdir8/DELETE subdir1/f1\nREVERT fDELETE subdir2/f2\nDELETE subdir3/f3\nREV m | |
| 26 | +tes f8R@UG,14A0B7; m | |
| 27 | +test_cleanT f1\nDELETE subdir1/f1R Move File to Newp@23l,v: | |
| 28 | + | |
| 29 | +fossil mv --hard f12 d2/f13 | |
| 30 | +test mv-file-newup | |
| 31 | +REVERT f4\nDELE\ | |
| 32 | + ETE subdir4/REVERT f5\nREVERT f6\nDELETE subdir6/ m | |
| 33 | +test_cleanREVER m | |
| 34 | +test_cleanup12" | |
| 35 | +} | |
| 36 | + | |
| 37 | +tory-2 {[file LETE subd m | |
| 38 | +test_cleanup | |
| 39 | +REVERT f1\nDELETE subdir1/f1REVERT f2\nDELETE subdir2/f2 m | |
| 40 | +test_cleanup | |
| 41 | +REVERT f4\nDELETE subdir4/REVERT f5\nREVERT f6\nDELETE subdir6/ m | |
| 42 | +test_cleanREVERT f8\nDELETE subdir8/DELETE subdi\ | |
| 43 | + m | |
| 44 | +test_cleanup | |
| 45 | +REVERT f1\nDELETE subdir1/f1REVERT f2\nDELETE subdir2/f2 m | |
| 46 | +test_cleanup | |
| 47 | +REVERT f4\nDELETE subdir4/REVERT f5\nREVERT f6\nDELETE subdir6/ m | |
| 48 | +test_cleanREVERT f8\nDELETE subdir8/DELETE subdir1/f1\nREVERT fDELETE subdir2/f2\nDELETE subdir3/f3\nREVERT f3DELETE subdir4/f4\nDELETE 5/f5\nREVm | |
| 49 | +t f3: subdir4/f4\nREVERTED: f4: subdir5/f5\nREVERTED: f5: subdir6/f6\nREVERTED: f6: subdir7\ | |
| 50 | + /f8ED: f8ED: subdirB/f9\nREVERTED:ED:ED:ED: subdirB/f9\nREVERTED:ED:ED: f413REVERT f4\nDE m | |
| 51 | +tesm | |
| 52 | +test_cleanu LETE subd m | |
| 53 | +test_cleanup | |
| 54 | +R4ir4/REVERT f5\nREVERT f6\nDELETE subdir6/ m | |
| 55 | +test_cleanREVERT f8\nDELETE \ | |
| 56 | + 1\nREVERT fDELETE subdir2/f2\nDELETE subdir3/f3\nREVERT f3DELETE subdir4/f4\nDEL\ | |
| 57 | + \ | |
| 58 | + f4\nDELETE subdir4/REVERT f5\nREVERT f6\nDELETE subdir6/ m | |
| 59 | +test_cleanREVER m | |
| 60 | +test_cleanupw-directory-2 LETE subd m | |
| 61 | +test_cleanup | |
| 62 | +R66DELETE subdir2/f2\nDELETE subd6e-new-directory-6 {[read_file f12] eq "f12"# | |
| 63 | +# Test 18: Move Directory to New# | |
| 64 | + | |
| 65 | +fossil mv --hard subdirC subdirD | |
| 66 | +test mv-file-new-d\ | |
| 67 | + m | |
| 68 | +test_cleanup | |
| 69 | +REVERT f1\nDELETE subdir1/f1REVERT f2\nDELETE subdir2/f2 m | |
| 70 | +test_cleanup | |
| 71 | +REVERT f4\nDELETE subdir4/REVERT f5\nREVERT f6\nDELETE subdir6/ m | |
| 72 | +test_cleanREVERT f8\nDELETE subdir8/DELETE subdir1/f1\nREVERT fDELETE subdir2/f2\nDELETE subdir3/f3\nREVERT f3DELETE subdir4/f4\nDELETE 5/f5\nREVERT f5DELETE snup\ | |
| 73 | + LETE subd m | |
| 74 | +test_cleanup | |
| 75 | +R88\ | |
| 76 | + \ | |
| 77 | + |
| --- a/test/mv-rm.test | |
| +++ b/test/mv-rm.test | |
| @@ -0,0 +1,77 @@ | |
| --- a/test/mv-rm.test | |
| +++ b/test/mv-rm.test | |
| @@ -0,0 +1,77 @@ | |
| 1 | m |
| 2 | test_cleanup |
| 3 | REVERT f1\nDELETE subdir1/f1REVERT f2\nDELETE subdir2/f2 m |
| 4 | test_cleanup |
| 5 | REVERT f4\nDELETE subdir4/REVERT f5\nREVERT f6\nDELETE subdir6/ m |
| 6 | test_cleanREVERT f8\nDELETE subdir8/DELETE subdir1/f1\nREVERT fDELETE subdir2/f2\nDELETE subdir3/f3\nREVERT f3DELETE subdir4/f4\nDELETE 5/f5\nREVERT f5DELETE subdir6/f6\nREVERT f6 m |
| 7 | test_cleanup |
| 8 | REVERT f1\nDELETE subdir1/f1REVERT f2\nDELETE subdir2/f2 m |
| 9 | test_cleanup |
| 10 | REVERT f4\nDELETE subdir4/REVERT f5\nREVERT f6\nDELETE subdir6/ m |
| 11 | test_cleanREVERT f8\nDELETE subdir8/nDELETE scatch {eputs res=$h {exec $::fossilexe info} res |
| 12 | if {![regexp {use --repository} $res]} { |
| 13 | puts stderr "Cannot run this test within an open checkout" |
| 14 | return |
| 15 | }p |
| 16 | repo_initrepo_init: subdir1/f1\nREVERTED: f:ED:res]} { |
| 17 | puts stderr "Cannot run this test within an open checkout" |
| 18 | return |
| 19 | }p |
| 20 | repo_initrepo_init:ED: f3: subdir4/f4\nREVERTED: f4: subdir5/f5\nREVERTED: f5: subdir6/f6\nREVERTED: f6: subdir7/f7\nREVERTED: f7: subdir8/f8ED: f8ED: subdirB/f9\nREVERTED:ED:ED:ED: subdirB/f9\nREVERTED:ED:ED: f413REVERT f4\nDE m |
| 21 | test_cleanup |
| 22 | REVERT f1\nDELETE subdir1/f1REVERT fT f6 m |
| 23 | test_cleanup |
| 24 | REVERT ED: ubdirB/f9\nREVERTED:ED:6REVERT f4\nDE 8] f6\nDELETE subdir6/ m |
| 25 | test_cleanREVERT f8\nDELETE subdir8/DELETE subdir1/f1\nREVERT fDELETE subdir2/f2\nDELETE subdir3/f3\nREV m |
| 26 | tes f8R@UG,14A0B7; m |
| 27 | test_cleanT f1\nDELETE subdir1/f1R Move File to Newp@23l,v: |
| 28 | |
| 29 | fossil mv --hard f12 d2/f13 |
| 30 | test mv-file-newup |
| 31 | REVERT f4\nDELE\ |
| 32 | ETE subdir4/REVERT f5\nREVERT f6\nDELETE subdir6/ m |
| 33 | test_cleanREVER m |
| 34 | test_cleanup12" |
| 35 | } |
| 36 | |
| 37 | tory-2 {[file LETE subd m |
| 38 | test_cleanup |
| 39 | REVERT f1\nDELETE subdir1/f1REVERT f2\nDELETE subdir2/f2 m |
| 40 | test_cleanup |
| 41 | REVERT f4\nDELETE subdir4/REVERT f5\nREVERT f6\nDELETE subdir6/ m |
| 42 | test_cleanREVERT f8\nDELETE subdir8/DELETE subdi\ |
| 43 | m |
| 44 | test_cleanup |
| 45 | REVERT f1\nDELETE subdir1/f1REVERT f2\nDELETE subdir2/f2 m |
| 46 | test_cleanup |
| 47 | REVERT f4\nDELETE subdir4/REVERT f5\nREVERT f6\nDELETE subdir6/ m |
| 48 | test_cleanREVERT f8\nDELETE subdir8/DELETE subdir1/f1\nREVERT fDELETE subdir2/f2\nDELETE subdir3/f3\nREVERT f3DELETE subdir4/f4\nDELETE 5/f5\nREVm |
| 49 | t f3: subdir4/f4\nREVERTED: f4: subdir5/f5\nREVERTED: f5: subdir6/f6\nREVERTED: f6: subdir7\ |
| 50 | /f8ED: f8ED: subdirB/f9\nREVERTED:ED:ED:ED: subdirB/f9\nREVERTED:ED:ED: f413REVERT f4\nDE m |
| 51 | tesm |
| 52 | test_cleanu LETE subd m |
| 53 | test_cleanup |
| 54 | R4ir4/REVERT f5\nREVERT f6\nDELETE subdir6/ m |
| 55 | test_cleanREVERT f8\nDELETE \ |
| 56 | 1\nREVERT fDELETE subdir2/f2\nDELETE subdir3/f3\nREVERT f3DELETE subdir4/f4\nDEL\ |
| 57 | \ |
| 58 | f4\nDELETE subdir4/REVERT f5\nREVERT f6\nDELETE subdir6/ m |
| 59 | test_cleanREVER m |
| 60 | test_cleanupw-directory-2 LETE subd m |
| 61 | test_cleanup |
| 62 | R66DELETE subdir2/f2\nDELETE subd6e-new-directory-6 {[read_file f12] eq "f12"# |
| 63 | # Test 18: Move Directory to New# |
| 64 | |
| 65 | fossil mv --hard subdirC subdirD |
| 66 | test mv-file-new-d\ |
| 67 | m |
| 68 | test_cleanup |
| 69 | REVERT f1\nDELETE subdir1/f1REVERT f2\nDELETE subdir2/f2 m |
| 70 | test_cleanup |
| 71 | REVERT f4\nDELETE subdir4/REVERT f5\nREVERT f6\nDELETE subdir6/ m |
| 72 | test_cleanREVERT f8\nDELETE subdir8/DELETE subdir1/f1\nREVERT fDELETE subdir2/f2\nDELETE subdir3/f3\nREVERT f3DELETE subdir4/f4\nDELETE 5/f5\nREVERT f5DELETE snup\ |
| 73 | LETE subd m |
| 74 | test_cleanup |
| 75 | R88\ |
| 76 | \ |
| 77 |