diff options
Diffstat (limited to 't/t3700-add.sh')
-rwxr-xr-x | t/t3700-add.sh | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/t/t3700-add.sh b/t/t3700-add.sh index 494f5b84f5..1fa5dfd5cc 100755 --- a/t/t3700-add.sh +++ b/t/t3700-add.sh @@ -332,24 +332,18 @@ test_expect_success 'git add --dry-run --ignore-missing of non-existing file out test_i18ncmp expect.err actual.err ' -test_expect_success 'git add --chmod=+x stages a non-executable file with +x' ' +test_expect_success 'git add --chmod=[+-]x stages correctly' ' rm -f foo1 && echo foo >foo1 && git add --chmod=+x foo1 && case "$(git ls-files --stage foo1)" in 100755" "*foo1) echo pass;; *) echo fail; git ls-files --stage foo1; (exit 1);; - esac -' - -test_expect_success 'git add --chmod=-x stages an executable file with -x' ' - rm -f xfoo1 && - echo foo >xfoo1 && - chmod 755 xfoo1 && - git add --chmod=-x xfoo1 && - case "$(git ls-files --stage xfoo1)" in - 100644" "*xfoo1) echo pass;; - *) echo fail; git ls-files --stage xfoo1; (exit 1);; + esac && + git add --chmod=-x foo1 && + case "$(git ls-files --stage foo1)" in + 100644" "*foo1) echo pass;; + *) echo fail; git ls-files --stage foo1; (exit 1);; esac ' |