(command.CommandList children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:test_description) op: Equal rhs: {(SQ <'apply a patch that is larger than the preimage'>)} ) ] ) (C {(.)} {(./test-lib.sh)}) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(F)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(word_part.EscapedLiteralPart token:<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') ] ) ] ) (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)}) ] )