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