e2e: Test worktree names with whitespace

This commit is contained in:
2022-06-23 19:13:48 +02:00
parent 88961e1c6b
commit 92ec2e1a2d

View File

@@ -97,7 +97,13 @@ def test_worktree_add(
def test_worktree_add_invalid_name():
with TempGitRepositoryWorktree.get(funcname()) as (base_dir, _commit):
for worktree_name in ["/absolute/path" "trailingslash/"]:
for worktree_name in [
"/absolute/path",
"trailingslash/",
"with spaces",
"with\t tabs",
"with\nnewline",
]:
args = ["wt", "add", worktree_name]
cmd = grm(args, cwd=base_dir)
assert cmd.returncode != 0