(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'test_description='> name:test_description) op: assign_op.Equal rhs: {(SQ <'git add --all'>)} spids: [4] ) ] redirects: [] ) (C {<.>} {<'./test-lib.sh'>}) (C {<test_expect_success>} {<setup>} { (SQ <'\n'> <'\t(\n'> <'\t\techo .gitignore\n'> <'\t\techo will-remove\n'> <'\t) >expect &&\n'> <'\t(\n'> <'\t\techo actual\n'> <'\t\techo expect\n'> <'\t\techo ignored\n'> <'\t) >.gitignore &&\n'> <'\tgit --literal-pathspecs add --all &&\n'> <'\t>will-remove &&\n'> <'\tgit add --all &&\n'> <'\ttest_tick &&\n'> <'\tgit commit -m initial &&\n'> <'\tgit ls-files >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'git add --all'>)} { (SQ <'\n'> <'\t(\n'> <'\t\techo .gitignore\n'> <'\t\techo not-ignored\n'> <'\t\techo "M\t.gitignore"\n'> <'\t\techo "A\tnot-ignored"\n'> <'\t\techo "D\twill-remove"\n'> <'\t) >expect &&\n'> <'\t>ignored &&\n'> <'\t>not-ignored &&\n'> <'\techo modification >>.gitignore &&\n'> <'\trm -f will-remove &&\n'> <'\tgit add --all &&\n'> <'\tgit update-index --refresh &&\n'> <'\tgit ls-files >actual &&\n'> <'\tgit diff-index --name-status --cached HEAD >>actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'Just "git add" is a no-op'>)} { (SQ <'\n'> <'\tgit reset --hard &&\n'> <'\techo >will-remove &&\n'> <'\t>will-not-be-added &&\n'> <'\tgit add &&\n'> <'\tgit diff-index --name-status --cached HEAD >actual &&\n'> <'\t>expect &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_done>}) ] )