test(processor): git-mode whole-file and line-range cases

This commit is contained in:
2026-07-02 09:20:06 -05:00
parent a117f75bba
commit 3db4911e7a
5 changed files with 10 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
a(); // one
b(); // two
+2
View File
@@ -0,0 +1,2 @@
a();
b(); // two
+2
View File
@@ -0,0 +1,2 @@
# gone
x = 1 # inline
+1
View File
@@ -0,0 +1 @@
x = 1
+3
View File
@@ -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 {