mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-06 07:18:28 +01:00
tests: Windows specific filename for gitignore
This commit is contained in:
@@ -637,8 +637,14 @@ def test_should_protect_on_repeated_add(link, dvc_repo, repo_dir):
|
||||
|
||||
|
||||
def test_escape_gitignore_entries(git, dvc_repo, repo_dir):
|
||||
fname = "file!with*weird#naming_[1].txt"
|
||||
ignored_fname = r"/file\!with\*weird\#naming_\[1\].txt"
|
||||
fname = "file!with*weird#naming_[1].t?t"
|
||||
ignored_fname = r"/file\!with\*weird\#naming_\[1\].t\?t"
|
||||
|
||||
if os.name == "nt":
|
||||
# Some characters are not supported by Windows in the filename
|
||||
# https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file
|
||||
fname = "file!with_weird#naming_[1].txt"
|
||||
ignored_fname = r"/file\!with_weird\#naming_\[1\].txt"
|
||||
|
||||
os.rename(repo_dir.FOO, fname)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user