test(processor): git-mode whole-file and line-range cases
This commit is contained in:
+2
@@ -0,0 +1,2 @@
|
|||||||
|
a(); // one
|
||||||
|
b(); // two
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
a();
|
||||||
|
b(); // two
|
||||||
+2
@@ -0,0 +1,2 @@
|
|||||||
|
# gone
|
||||||
|
x = 1 # inline
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
x = 1
|
||||||
@@ -108,6 +108,9 @@ func TestWholeFile(t *testing.T) {
|
|||||||
cli: types.CLI{PreserveLines: true}},
|
cli: types.CLI{PreserveLines: true}},
|
||||||
{name: "--backup writes .bak of original", file: "py_backup.py",
|
{name: "--backup writes .bak of original", file: "py_backup.py",
|
||||||
cli: types.CLI{Backup: true}, wantBackup: true},
|
cli: types.CLI{Backup: true}, wantBackup: true},
|
||||||
|
{name: "git whole file (untracked, nil ranges)", file: "git_whole.py", gitMode: true},
|
||||||
|
{name: "git range limits stripping to changed lines", file: "git_range.js",
|
||||||
|
gitMode: true, ranges: []git.LineRange{{Start: 1, End: 1}}},
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, tc := range cases {
|
for _, tc := range cases {
|
||||||
|
|||||||
Reference in New Issue
Block a user