Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitca06b11

Browse files
committed
test adding a file using non-normalized path
1 parentf2254af commitca06b11

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

‎test/test_index.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,6 +1181,18 @@ def test_index_add_pathlike(self, rw_repo):
11811181

11821182
rw_repo.index.add(file)
11831183

1184+
@with_rw_repo("HEAD")
1185+
deftest_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+
ifos.name!="nt":
1192+
non_normalized_path=non_normalized_path.replace("/","\\")
1193+
1194+
rw_repo.index.add(non_normalized_path)
1195+
11841196

11851197
classTestIndexUtils:
11861198
@pytest.mark.parametrize("file_path_type", [str,Path])

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp