From 326c9fc2ed2164e6840847fd073d8894ab1032c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Tue, 1 Dec 2015 20:41:23 +0100 Subject: checkout test: Apply umask to file-mode test as well MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix the file-mode test to expect system umask being applied to the created file as well (it is currently applied to the directory only). This fixes the test on systems where umask != 022. Signed-off-by: Michał Górny --- tests/checkout/index.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/checkout/index.c b/tests/checkout/index.c index 9fa901867..8af3e5684 100644 --- a/tests/checkout/index.c +++ b/tests/checkout/index.c @@ -298,7 +298,7 @@ void test_checkout_index__options_dir_modes(void) /* File-mode test, since we're on the 'dir' branch */ cl_git_pass(p_stat("./testrepo/a/b.txt", &st)); - cl_assert_equal_i_fmt(st.st_mode, GIT_FILEMODE_BLOB_EXECUTABLE, "%07o"); + cl_assert_equal_i_fmt(st.st_mode, GIT_FILEMODE_BLOB_EXECUTABLE & ~um, "%07o"); git_commit_free(commit); } -- cgit v1.2.1