(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:test_description) op: assign_op.Equal rhs: {(SQ <'git am with options and not losing them'>)} spids: [4] ) ] ) (C {<.>} {<'./test-lib.sh'>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:tm) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$TEST_DIRECTORY') <'/t4252'>)} spids: [14] ) ] ) (C {<test_expect_success>} {<setup>} { (SQ <'\n'> <'\tcp "$tm/file-1-0" file-1 &&\n'> <'\tcp "$tm/file-2-0" file-2 &&\n'> <'\tgit add file-1 file-2 &&\n'> <'\ttest_tick &&\n'> <'\tgit commit -m initial &&\n'> <'\tgit tag initial\n'> ) } ) (C {<test_expect_success>} {(SQ <'interrupted am --whitespace=fix'>)} { (SQ <'\n'> <'\trm -rf .git/rebase-apply &&\n'> <'\tgit reset --hard initial &&\n'> <'\ttest_must_fail git am --whitespace=fix "$tm"/am-test-1-? &&\n'> <'\tgit am --skip &&\n'> <'\tgrep 3 file-1 &&\n'> <'\tgrep "^Six$" file-2\n'> ) } ) (C {<test_expect_success>} {(SQ <'interrupted am -C1'>)} { (SQ <'\n'> <'\trm -rf .git/rebase-apply &&\n'> <'\tgit reset --hard initial &&\n'> <'\ttest_must_fail git am -C1 "$tm"/am-test-2-? &&\n'> <'\tgit am --skip &&\n'> <'\tgrep 3 file-1 &&\n'> <'\tgrep "^Three$" file-2\n'> ) } ) (C {<test_expect_success>} {(SQ <'interrupted am -p2'>)} { (SQ <'\n'> <'\trm -rf .git/rebase-apply &&\n'> <'\tgit reset --hard initial &&\n'> <'\ttest_must_fail git am -p2 "$tm"/am-test-3-? &&\n'> <'\tgit am --skip &&\n'> <'\tgrep 3 file-1 &&\n'> <'\tgrep "^Three$" file-2\n'> ) } ) (C {<test_expect_success>} {(SQ <'interrupted am -C1 -p2'>)} { (SQ <'\n'> <'\trm -rf .git/rebase-apply &&\n'> <'\tgit reset --hard initial &&\n'> <'\ttest_must_fail git am -p2 -C1 "$tm"/am-test-4-? &&\n'> <'\tgit am --skip &&\n'> <'\tgrep 3 file-1 &&\n'> <'\tgrep "^Three$" file-2\n'> ) } ) (C {<test_expect_success>} {(SQ <'interrupted am --directory="frotz nitfol"'>)} { (SQ <'\n'> <'\trm -rf .git/rebase-apply &&\n'> <'\tgit reset --hard initial &&\n'> <'\ttest_must_fail git am --directory="frotz nitfol" "$tm"/am-test-5-? &&\n'> <'\tgit am --skip &&\n'> <'\tgrep One "frotz nitfol/file-5"\n'> ) } ) (C {<test_expect_success>} {(SQ <'apply to a funny path'>)} {(SQ <'\n'> <'\twith_sq="with'>) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <'sq" &&\n'> <'\trm -fr .git/rebase-apply &&\n'> <'\tgit reset --hard initial &&\n'> <'\tgit am --directory="$with_sq" "$tm"/am-test-5-2 &&\n'> <'\ttest -f "$with_sq/file-5"\n'> ) } ) (C {<test_expect_success>} {(SQ <'am --reject'>)} { (SQ <'\n'> <'\trm -rf .git/rebase-apply &&\n'> <'\tgit reset --hard initial &&\n'> <'\ttest_must_fail git am --reject "$tm"/am-test-6-1 &&\n'> <'\tgrep "@@ -1,3 +1,3 @@" file-2.rej &&\n'> <'\ttest_must_fail git diff-files --exit-code --quiet file-2 &&\n'> <'\tgrep "[-]-reject" .git/rebase-apply/apply-opt\n'> ) } ) (C {<test_done>}) ] )