Commit 71ef639e5f48be8e8b459cc705be7f58016256f8

Edward Thomson 2015-08-30T18:57:06

status test: brackets are now literal

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/tests/status/worktree_init.c b/tests/status/worktree_init.c
index cc7e126..9d5cfa5 100644
--- a/tests/status/worktree_init.c
+++ b/tests/status/worktree_init.c
@@ -191,10 +191,10 @@ void test_status_worktree_init__bracket_in_filename(void)
 	cl_git_pass(git_status_file(&status_flags, repo, FILE_WITHOUT_BRACKET));
 	cl_assert(status_flags == GIT_STATUS_WT_NEW);
 
-	cl_git_pass(git_status_file(&status_flags, repo, "LICENSE\\[1\\].md"));
-	cl_assert(status_flags == GIT_STATUS_INDEX_NEW);
+	cl_git_fail_with(git_status_file(&status_flags, repo, "LICENSE\\[1\\].md"), GIT_ENOTFOUND);
 
 	cl_git_pass(git_status_file(&status_flags, repo, FILE_WITH_BRACKET));
+	cl_assert(status_flags == GIT_STATUS_INDEX_NEW);
 
 	git_index_free(index);
 	git_repository_free(repo);