test_expect_success 'commit wildcard pathspec limits commit' ' reset_git_repo && git add . && git commit --allow-empty -m "Test commit with * wildcard" -- "*" && cat >expected_files <<-\EOF && * ** ? [abc] a f* f** f?z foo*bar hello?world hello_world EOF git ls-tree -r --name-only HEAD > actual_files && test_cmp expected_files actual_files ' I get issues with these test cases, Specially at git ls-tree -r --name-only HEAD > actual_files For some reason the test_cmp doesn't get resolved Is it a bad way to do? or is there a better way?