(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:test_description)
          op: assign_op.Equal
          rhs: {(SQ <'git blame encoding conversion'>)}
          spids: [4]
        )
      ]
    )
    (C {<.>} {<'./test-lib.sh'>})
    (C {<.>} {(DQ ($ Id.VSub_DollarName '$TEST_DIRECTORY')) <'/t8005/utf8.txt'>})
    (C {<.>} {(DQ ($ Id.VSub_DollarName '$TEST_DIRECTORY')) <'/t8005/euc-japan.txt'>})
    (C {<.>} {(DQ ($ Id.VSub_DollarName '$TEST_DIRECTORY')) <'/t8005/sjis.txt'>})
    (C {<test_expect_success>} {(SQ <'setup the repository'>)} 
      {
        (SQ <'\n'> <'\t# Create the file\n'> <'\techo "UTF-8 LINE" > file &&\n'> <'\tgit add file &&\n'> 
          <'\tgit commit --author "$UTF8_NAME <utf8@localhost>" -m "$UTF8_MSG" &&\n'> <'\n'> <'\techo "EUC-JAPAN LINE" >> file &&\n'> <'\tgit add file &&\n'> 
          <'\tgit config i18n.commitencoding eucJP &&\n'> <'\tgit commit --author "$EUC_JAPAN_NAME <euc-japan@localhost>" -m "$EUC_JAPAN_MSG" &&\n'> <'\n'> 
          <'\techo "SJIS LINE" >> file &&\n'> <'\tgit add file &&\n'> <'\tgit config i18n.commitencoding SJIS &&\n'> 
          <'\tgit commit --author "$SJIS_NAME <sjis@localhost>" -m "$SJIS_MSG"\n'>
        )
      }
    )
    (command.Simple
      words: [{<cat>}]
      redirects: [
        (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expected>})
        (redir
          op: <Id.Redir_DLess '<<'>
          loc: (redir_loc.Fd fd:0)
          arg: 
            (redir_param.MultiLine
              here_begin: {<EOF>}
              here_end_span_id: 88
              stdin_parts: [
                <'author '>
                ($ Id.VSub_DollarName '$SJIS_NAME')
                <'\n'>
                <'summary '>
                ($ Id.VSub_DollarName '$SJIS_MSG')
                <'\n'>
                <'author '>
                ($ Id.VSub_DollarName '$SJIS_NAME')
                <'\n'>
                <'summary '>
                ($ Id.VSub_DollarName '$SJIS_MSG')
                <'\n'>
                <'author '>
                ($ Id.VSub_DollarName '$SJIS_NAME')
                <'\n'>
                <'summary '>
                ($ Id.VSub_DollarName '$SJIS_MSG')
                <'\n'>
              ]
            )
        )
      ]
      do_fork: T
    )
    (command.ShFunction
      name: filter_author_summary
      body: 
        (BraceGroup
          children: [
            (C {<sed>} {<-n>} {<-e>} {(SQ <'/^author /p'>)} {<-e>} {(SQ <'/^summary /p'>)} 
              {(DQ ($ Id.VSub_At '$@'))}
            )
          ]
        )
    )
    (C {<test_expect_success>} {<Id.KW_Bang '!'> <MINGW>} {(SQ <'blame respects i18n.commitencoding'>)} 
      {
        (SQ <'\n'> <'\tgit blame --incremental file >output &&\n'> 
          <'\tfilter_author_summary output >actual &&\n'> <'\ttest_cmp expected actual\n'>
        )
      }
    )
    (command.Simple
      words: [{<cat>}]
      redirects: [
        (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expected>})
        (redir
          op: <Id.Redir_DLess '<<'>
          loc: (redir_loc.Fd fd:0)
          arg: 
            (redir_param.MultiLine
              here_begin: {<EOF>}
              here_end_span_id: 167
              stdin_parts: [
                <'author '>
                ($ Id.VSub_DollarName '$EUC_JAPAN_NAME')
                <'\n'>
                <'summary '>
                ($ Id.VSub_DollarName '$EUC_JAPAN_MSG')
                <'\n'>
                <'author '>
                ($ Id.VSub_DollarName '$EUC_JAPAN_NAME')
                <'\n'>
                <'summary '>
                ($ Id.VSub_DollarName '$EUC_JAPAN_MSG')
                <'\n'>
                <'author '>
                ($ Id.VSub_DollarName '$EUC_JAPAN_NAME')
                <'\n'>
                <'summary '>
                ($ Id.VSub_DollarName '$EUC_JAPAN_MSG')
                <'\n'>
              ]
            )
        )
      ]
      do_fork: T
    )
    (C {<test_expect_success>} {<Id.KW_Bang '!'> <MINGW>} 
      {(SQ <'blame respects i18n.logoutputencoding'>)} 
      {
        (SQ <'\n'> <'\tgit config i18n.logoutputencoding eucJP &&\n'> 
          <'\tgit blame --incremental file >output &&\n'> <'\tfilter_author_summary output >actual &&\n'> <'\ttest_cmp expected actual\n'>
        )
      }
    )
    (command.Simple
      words: [{<cat>}]
      redirects: [
        (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expected>})
        (redir
          op: <Id.Redir_DLess '<<'>
          loc: (redir_loc.Fd fd:0)
          arg: 
            (redir_param.MultiLine
              here_begin: {<EOF>}
              here_end_span_id: 216
              stdin_parts: [
                <'author '>
                ($ Id.VSub_DollarName '$UTF8_NAME')
                <'\n'>
                <'summary '>
                ($ Id.VSub_DollarName '$UTF8_MSG')
                <'\n'>
                <'author '>
                ($ Id.VSub_DollarName '$UTF8_NAME')
                <'\n'>
                <'summary '>
                ($ Id.VSub_DollarName '$UTF8_MSG')
                <'\n'>
                <'author '>
                ($ Id.VSub_DollarName '$UTF8_NAME')
                <'\n'>
                <'summary '>
                ($ Id.VSub_DollarName '$UTF8_MSG')
                <'\n'>
              ]
            )
        )
      ]
      do_fork: T
    )
    (C {<test_expect_success>} {<Id.KW_Bang '!'> <MINGW>} {(SQ <'blame respects --encoding=UTF-8'>)} 
      {
        (SQ <'\n'> <'\tgit blame --incremental --encoding=UTF-8 file >output &&\n'> 
          <'\tfilter_author_summary output >actual &&\n'> <'\ttest_cmp expected actual\n'>
        )
      }
    )
    (command.Simple
      words: [{<cat>}]
      redirects: [
        (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expected>})
        (redir
          op: <Id.Redir_DLess '<<'>
          loc: (redir_loc.Fd fd:0)
          arg: 
            (redir_param.MultiLine
              here_begin: {<EOF>}
              here_end_span_id: 264
              stdin_parts: [
                <'author '>
                ($ Id.VSub_DollarName '$SJIS_NAME')
                <'\n'>
                <'summary '>
                ($ Id.VSub_DollarName '$SJIS_MSG')
                <'\n'>
                <'author '>
                ($ Id.VSub_DollarName '$EUC_JAPAN_NAME')
                <'\n'>
                <'summary '>
                ($ Id.VSub_DollarName '$EUC_JAPAN_MSG')
                <'\n'>
                <'author '>
                ($ Id.VSub_DollarName '$UTF8_NAME')
                <'\n'>
                <'summary '>
                ($ Id.VSub_DollarName '$UTF8_MSG')
                <'\n'>
              ]
            )
        )
      ]
      do_fork: T
    )
    (C {<test_expect_success>} {<Id.KW_Bang '!'> <MINGW>} {(SQ <'blame respects --encoding=none'>)} 
      {
        (SQ <'\n'> <'\tgit blame --incremental --encoding=none file >output &&\n'> 
          <'\tfilter_author_summary output >actual &&\n'> <'\ttest_cmp expected actual\n'>
        )
      }
    )
    (C {<test_done>})
  ]
)