(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 corrupt input'>)}
          spids: [4]
        )
      ]
    )
    (C {<.>} {<'./test-lib.sh'>})
    (C {<test_expect_success>} {<setup>} 
      {
        (SQ <'\n'> <'\t# Note the missing "+++" line:\n'> <'\tcat >bad-patch.diff <<-\\EOF &&\n'> 
          <'\tFrom: A U Thor <au.thor@example.com>\n'> <'\tdiff --git a/f b/f\n'> <'\tindex 7898192..6178079 100644\n'> <'\t--- a/f\n'> <'\t@@ -1 +1 @@\n'> 
          <'\t-a\n'> <'\t+b\n'> <'\tEOF\n'> <'\n'> <'\techo a >f &&\n'> <'\tgit add f &&\n'> <'\ttest_tick &&\n'> 
          <'\tgit commit -m initial\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'try to apply corrupted patch'>)} 
      {(SQ <'\n'> <'\ttest_must_fail git am bad-patch.diff 2>actual\n'>)}
    )
    (C {<test_expect_success>} {(SQ <'compare diagnostic; ensure file is still here'>)} 
      {
        (SQ <'\n'> 
          <'\techo "error: git diff header lacks filename information (line 4)" >expected &&\n'> <'\ttest_path_is_file f &&\n'> <'\ttest_i18ncmp expected actual\n'>
        )
      }
    )
    (C {<test_done>})
  ]
)