| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1181,6 +1181,18 @@ def test_index_add_pathlike(self, rw_repo): | |||
| 1181 | 1181 | ||
| 1182 | 1182 | rw_repo.index.add(file) | |
| 1183 | 1183 | ||
| 1184 | + @with_rw_repo("HEAD") | ||
| 1185 | + def test_index_add_non_normalized_path(self, rw_repo): | ||
| 1186 | + git_dir = Path(rw_repo.git_dir) | ||
| 1187 | + | ||
| 1188 | + file = git_dir / "file.txt" | ||
| 1189 | + file.touch() | ||
| 1190 | + non_normalized_path = file.as_posix() | ||
| 1191 | + if os.name != "nt": | ||
| 1192 | + non_normalized_path = non_normalized_path.replace("/", "\\") | ||
| 1193 | + | ||
| 1194 | + rw_repo.index.add(non_normalized_path) | ||
| 1195 | + | ||
| 1184 | 1196 | ||
| 1185 | 1197 | class TestIndexUtils: | |
| 1186 | 1198 | @pytest.mark.parametrize("file_path_type", [str, Path]) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments