(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:test_description) op: assign_op.Equal rhs: {(SQ <'apply a patch that is larger than the preimage'>)} spids: [4] ) ] ) (C {<.>} {<'./test-lib.sh'>}) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<F>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.MultiLine here_begin: {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\E'>) <OF>} here_end_span_id: 44 stdin_parts: [ <'1\n'> <'2\n'> <'3\n'> <'4\n'> <'5\n'> <'6\n'> <'7\n'> <'8\n'> <'999999\n'> <'A\n'> <'B\n'> <'C\n'> <'D\n'> <'E\n'> <'F\n'> <'G\n'> <'H\n'> <'I\n'> <'J\n'> <'\n'> ] ) ) ] do_fork: T ) (C {<test_expect_success>} {<setup>} { (SQ <'\n'> <'\n'> <'\tgit add F &&\n'> <'\tmv F G &&\n'> <'\tsed -e "s/1/11/" -e "s/999999/9/" -e "s/H/HH/" <G >F &&\n'> <'\tgit diff >patch &&\n'> <'\tsed -e "/^\\$/d" <G >F &&\n'> <'\tgit add F\n'> <'\n'> ) } ) (C {<test_expect_success>} {(SQ <'apply should fail gracefully'>)} { (SQ <'\n'> <'\n'> <'\tif git apply --index patch\n'> <'\tthen\n'> <'\t\techo Oops, should not have succeeded\n'> <'\t\tfalse\n'> <'\telse\n'> <'\t\tstatus=$?\n'> <'\t\techo "Status was $status"\n'> <'\t\tif test -f .git/index.lock\n'> <'\t\tthen\n'> <'\t\t\techo Oops, should not have crashed\n'> <'\t\t\tfalse\n'> <'\t\tfi\n'> <'\tfi\n'> ) } ) (C {<test_done>}) ] )