(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:test_description)
          op: Equal
          rhs: {(SQ <'git svn honors i18n.commitEncoding in config'>)}
          spids: [10]
        )
      ]
      spids: [10]
    )
    (C {(.)} {(./lib-git-svn.sh)})
    (FuncDef
      name: compare_git_head_with
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:nr)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [
                              (SimpleCommand
                                words: [{(wc)} {(-l)}]
                                redirects: [
                                  (Redir
                                    op_id: Redir_Less
                                    fd: 16777215
                                    arg_word: {(DQ ($ VSub_Number '$1'))}
                                    spids: [35]
                                  )
                                ]
                              )
                            ]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [30 40]
                      )
                    }
                  spids: [29]
                )
              ]
              spids: [29]
            )
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:a) op:Equal rhs:{(7)} spids:[43])]
              spids: [43]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:b)
                  op: Equal
                  rhs: 
                    {
                      (ArithSubPart
                        anode: 
                          (ArithBinary
                            op_id: Arith_Minus
                            left: 
                              (ArithBinary
                                op_id: Arith_Plus
                                left: (ArithWord w:{($ VSub_Name '$a')})
                                right: (ArithWord w:{($ VSub_Name '$nr')})
                              )
                            right: (ArithWord w:{(Lit_Digits 1)})
                          )
                        spids: [48 59]
                      )
                    }
                  spids: [47]
                )
              ]
              spids: [47]
            )
            (AndOr
              ops: [Op_DAmp]
              children: [
                (Pipeline
                  children: [
                    (C {(git)} {(cat-file)} {(commit)} {(HEAD)})
                    (SimpleCommand
                      words: [{(sed)} {(-ne)} {(DQ ($ VSub_Name '$a') (',') (${ VSub_Name b) (p))}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {(current)}
                          spids: [85]
                        )
                      ]
                    )
                  ]
                  negated: F
                )
                (C {(test_cmp)} {(current)} {(DQ ($ VSub_Number '$1'))})
              ]
            )
          ]
          spids: [26]
        )
      spids: [21 25]
    )
    (C {(prepare_a_utf8_locale)})
    (FuncDef
      name: compare_svn_head_with
      body: 
        (BraceGroup
          children: [
            (AndOr
              ops: [Op_DAmp]
              children: [
                (Pipeline
                  children: [
                    (SimpleCommand
                      words: [
                        {(svn)}
                        {(log)}
                        {
                          (CommandSubPart
                            command_list: 
                              (CommandList
                                children: [(C {(git)} {(svn)} {(info)} {(--url)})]
                              )
                            left_token: <Left_CommandSub '$('>
                            spids: [130 138]
                          )
                        }
                      ]
                      more_env: [
                        (env_pair
                          name: LC_ALL
                          val: {(DQ ($ VSub_Name '$a_utf8_locale'))}
                          spids: [121]
                        )
                      ]
                    )
                    (SimpleCommand
                      words: [
                        {(perl)}
                        {(-w)}
                        {(-e)}
                        {
                          (SQ <'\n'> <'\t\tuse bytes;\n'> <'\t\t$/ = ("-"x72) . "\\n";\n'> 
                            <'\t\tmy @x = <STDIN>;\n'> <'\t\t@x = split(/\\n/, $x[1]);\n'> <'\t\tsplice(@x, 0, 2);\n'> <'\t\t$x[-1] = "";\n'> 
                            <'\t\tprint join("\\n", @x);\n'> <'\t'>
                          )
                        }
                      ]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {(current)}
                          spids: [160]
                        )
                      ]
                    )
                  ]
                  negated: F
                )
                (C {(test_cmp)} {(current)} {(DQ ($ VSub_Number '$1'))})
              ]
            )
          ]
          spids: [110]
        )
      spids: [105 109]
    )
    (ForEach
      iter_name: H
      iter_words: [{(ISO8859-1)} {(eucJP)} {(ISO-2022-JP)}]
      do_arg_iter: F
      body: 
        (DoGroup
          children: [
            (C {(test_expect_success)} {(DQ ($ VSub_Name '$H') (' setup'))} 
              {
                (SQ <'\n'> <'\t\tmkdir $H &&\n'> 
                  <'\t\tsvn_cmd import -m "$H test" $H "$svnrepo"/$H &&\n'> <'\t\tgit svn clone "$svnrepo"/$H $H\n'> <'\t'>
                )
              }
            )
          ]
          spids: [190 208]
        )
      spids: [183 16777215]
    )
    (ForEach
      iter_name: H
      iter_words: [{(ISO8859-1)} {(eucJP)} {(ISO-2022-JP)}]
      do_arg_iter: F
      body: 
        (DoGroup
          children: [
            (C {(test_expect_success)} {(DQ ($ VSub_Name '$H') (' commit on git side'))} 
              {
                (SQ <'\n'> <'\t(\n'> <'\t\tcd $H &&\n'> <'\t\tgit config i18n.commitencoding $H &&\n'> 
                  <'\t\tgit checkout -b t refs/remotes/git-svn &&\n'> <'\t\techo $H >F &&\n'> <'\t\tgit add F &&\n'> 
                  <'\t\tgit commit -a -F "$TEST_DIRECTORY"/t3900/$H.txt &&\n'> <'\t\tE=$(git cat-file commit HEAD | sed -ne "s/^encoding //p") &&\n'> <'\t\ttest "z$E" = "z$H"\n'> 
                  <'\t\tcompare_git_head_with "$TEST_DIRECTORY"/t3900/$H.txt\n'> <'\t)\n'> <'\t'>
                )
              }
            )
          ]
          spids: [223 249]
        )
      spids: [216 16777215]
    )
    (ForEach
      iter_name: H
      iter_words: [{(ISO8859-1)} {(eucJP)} {(ISO-2022-JP)}]
      do_arg_iter: F
      body: 
        (DoGroup
          children: [
            (C {(test_expect_success)} {(DQ ($ VSub_Name '$H') (' dcommit to svn'))} 
              {
                (SQ <'\n'> <'\t(\n'> <'\t\tcd $H &&\n'> <'\t\tgit svn dcommit &&\n'> 
                  <'\t\tgit cat-file commit HEAD | grep git-svn-id: &&\n'> <'\t\tE=$(git cat-file commit HEAD | sed -ne "s/^encoding //p") &&\n'> <'\t\ttest "z$E" = "z$H" &&\n'> 
                  <'\t\tcompare_git_head_with "$TEST_DIRECTORY"/t3900/$H.txt\n'> <'\t)\n'> <'\t'>
                )
              }
            )
          ]
          spids: [264 287]
        )
      spids: [257 16777215]
    )
    (C {(test_expect_success)} {(UTF8)} {(SQ <'ISO-8859-1 should match UTF-8 in svn'>)} 
      {
        (SQ <'\n'> <'\t(\n'> <'\t\tcd ISO8859-1 &&\n'> 
          <'\t\tcompare_svn_head_with "$TEST_DIRECTORY"/t3900/1-UTF-8.txt\n'> <'\t)\n'>
        )
      }
    )
    (ForEach
      iter_name: H
      iter_words: [{(eucJP)} {(ISO-2022-JP)}]
      do_arg_iter: F
      body: 
        (DoGroup
          children: [
            (C {(test_expect_success)} {(UTF8)} {(DQ ($ VSub_Name '$H') (' should match UTF-8 in svn'))} 
              {
                (SQ <'\n'> <'\t\t(\n'> <'\t\t\tcd $H &&\n'> 
                  <'\t\t\tcompare_svn_head_with "$TEST_DIRECTORY"/t3900/2-UTF-8.txt\n'> <'\t\t)\n'> <'\t'>
                )
              }
            )
          ]
          spids: [317 338]
        )
      spids: [312 16777215]
    )
    (C {(test_done)})
  ]
)