Fossil SCM
Add diff test cases for added/deleted files indicated by /dev/null.
Commit
33174a3b5f169c6a3af6b59a4c8130dc34b1e9b2e1f4d7a17ccc68ac6302d0ee
Parent
be3eb3b85dec234…
1 file changed
+26
+26
| --- test/diff.test | ||
| +++ test/diff.test | ||
| @@ -108,9 +108,37 @@ | ||
| 108 | 108 | test diff-file5-1 {[normalize_result] eq {Index: file5.dat |
| 109 | 109 | ================================================================== |
| 110 | 110 | --- file5.dat |
| 111 | 111 | +++ file5.dat |
| 112 | 112 | cannot compute difference between binary files}} |
| 113 | + | |
| 114 | +############################################################################### | |
| 115 | + | |
| 116 | +fossil rm file1.dat | |
| 117 | +fossil diff -v file1.dat | |
| 118 | + | |
| 119 | +test diff-deleted-file-1 {[normalize_result] eq {DELETED file1.dat | |
| 120 | +Index: file1.dat | |
| 121 | +================================================================== | |
| 122 | +--- file1.dat | |
| ++++ /dev/null | ||
| 123 | +@@ -1,1 +0,0 @@ | |
| 124 | +-test file 1 (one line no term).}} | |
| 125 | + | |
| 126 | +############################################################################### | |
| 127 | + | |
| 128 | +write_file file6.dat "test file 6 (one line no term)." | |
| 129 | +fossil add file6.dat | |
| 130 | + | |
| 131 | +fossil diff -v file6.dat | |
| 132 | + | |
| 133 | +test diff-added-file-1 {[normalize_result] eq {ADDED file6.dat | |
| 134 | +Index: file6.dat | |
| 135 | +================================================================== | |
| 136 | +--- /dev/null | |
| ++++ file6.dat | ||
| 137 | +@@ -0,0 +1,1 @@ | |
| 138 | ++test file 6 (one line no term).}} | |
| 113 | 139 | |
| 114 | 140 | ############################################################################### |
| 115 | 141 | |
| 116 | 142 | test_cleanup |
| 117 | 143 |
| --- test/diff.test | |
| +++ test/diff.test | |
| @@ -108,9 +108,37 @@ | |
| 108 | test diff-file5-1 {[normalize_result] eq {Index: file5.dat |
| 109 | ================================================================== |
| 110 | --- file5.dat |
| 111 | +++ file5.dat |
| 112 | cannot compute difference between binary files}} |
| ++++ /dev/null | |
| ++++ file6.dat | |
| 113 | |
| 114 | ############################################################################### |
| 115 | |
| 116 | test_cleanup |
| 117 |
| --- test/diff.test | |
| +++ test/diff.test | |
| @@ -108,9 +108,37 @@ | |
| 108 | test diff-file5-1 {[normalize_result] eq {Index: file5.dat |
| 109 | ================================================================== |
| 110 | --- file5.dat |
| 111 | +++ file5.dat |
| 112 | cannot compute difference between binary files}} |
| 113 | |
| 114 | ############################################################################### |
| 115 | |
| 116 | fossil rm file1.dat |
| 117 | fossil diff -v file1.dat |
| 118 | |
| 119 | test diff-deleted-file-1 {[normalize_result] eq {DELETED file1.dat |
| 120 | Index: file1.dat |
| 121 | ================================================================== |
| 122 | --- file1.dat |
| ++++ /dev/null | |
| 123 | @@ -1,1 +0,0 @@ |
| 124 | -test file 1 (one line no term).}} |
| 125 | |
| 126 | ############################################################################### |
| 127 | |
| 128 | write_file file6.dat "test file 6 (one line no term)." |
| 129 | fossil add file6.dat |
| 130 | |
| 131 | fossil diff -v file6.dat |
| 132 | |
| 133 | test diff-added-file-1 {[normalize_result] eq {ADDED file6.dat |
| 134 | Index: file6.dat |
| 135 | ================================================================== |
| 136 | --- /dev/null |
| ++++ file6.dat | |
| 137 | @@ -0,0 +1,1 @@ |
| 138 | +test file 6 (one line no term).}} |
| 139 | |
| 140 | ############################################################################### |
| 141 | |
| 142 | test_cleanup |
| 143 |