(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:test_description)
          op: Equal
          rhs: {(SQ <'rewrite diff on binary file'>)}
          spids: [4]
        )
      ]
      spids: [4]
    )
    (C {(.)} {(./test-lib.sh)})
    (FuncDef
      name: make_file
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(printf)} {(DQ ('=') (Lit_Other '\\') (n))}]
              redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(file)} spids:[40])]
            )
            (ForEach
              iter_name: i
              iter_words: [{(1)} {(2)} {(3)} {(4)} {(5)} {(6)} {(7)} {(8)} {(9)} {(10)}]
              do_arg_iter: False
              body: 
                (DoGroup
                  children: [
                    (ForEach
                      iter_name: j
                      iter_words: [{(1)} {(2)} {(3)} {(4)} {(5)} {(6)} {(7)} {(8)} {(9)}]
                      do_arg_iter: False
                      body: 
                        (DoGroup
                          children: [
                            (ForEach
                              iter_name: k
                              iter_words: [{(1)} {(2)} {(3)} {(4)} {(5)}]
                              do_arg_iter: False
                              body: 
                                (DoGroup
                                  children: [
                                    (C {(printf)} {(DQ ($ VSub_Number '$1') (Lit_Other '\\') (n))})
                                  ]
                                  spids: [119 131]
                                )
                              spids: [107 16777215]
                            )
                          ]
                          spids: [99 134]
                        )
                      spids: [79 16777215]
                    )
                  ]
                  spids: [71 137]
                )
              redirects: [(Redir op_id:Redir_DGreat fd:16777215 arg_word:{(file)} spids:[139])]
              spids: [49 16777215]
            )
          ]
          spids: [25]
        )
      spids: [21 24]
    )
    (C {(test_expect_success)} {(SQ <'create binary file with changes'>)} 
      {(SQ <'\n'> <'\tmake_file "\\\\0" &&\n'> <'\tgit add file &&\n'> <'\tmake_file "\\\\01"\n'>)}
    )
    (C {(test_expect_success)} {(SQ <'vanilla diff is binary'>)} 
      {
        (SQ <'\n'> <'\tgit diff >diff &&\n'> <'\tgrep "Binary files a/file and b/file differ" diff\n'>)
      }
    )
    (C {(test_expect_success)} {(SQ <'rewrite diff is binary'>)} 
      {
        (SQ <'\n'> <'\tgit diff -B >diff &&\n'> <'\tgrep "dissimilarity index" diff &&\n'> 
          <'\tgrep "Binary files a/file and b/file differ" diff\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'rewrite diff can show binary patch'>)} 
      {
        (SQ <'\n'> <'\tgit diff -B --binary >diff &&\n'> <'\tgrep "dissimilarity index" diff &&\n'> 
          <'\tgrep "GIT binary patch" diff\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'rewrite diff --numstat shows binary changes'>)} 
      {
        (SQ <'\n'> <'\tgit diff -B --numstat --summary >diff &&\n'> <'\tgrep -e "-\t-\t" diff &&\n'> 
          <'\tgrep " rewrite file" diff\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'diff --stat counts binary rewrite as 0 lines'>)} 
      {
        (SQ <'\n'> <'\tgit diff -B --stat --summary >diff &&\n'> <'\tgrep "Bin" diff &&\n'> 
          <'\ttest_i18ngrep "0 insertions.*0 deletions" diff &&\n'> <'\tgrep " rewrite file" diff\n'>
        )
      }
    )
    (BraceGroup
      children: [
        (C {(echo)} {(DQ ('#!') ($ VSub_Name '$SHELL_PATH'))})
        (SimpleCommand
          words: [{(cat)}]
          redirects: [
            (HereDoc
              op_id: Redir_DLess
              fd: 16777215
              body: {('"$PERL_PATH" -e \'$/ = undef; $_ = <>; s/./ord($&)/ge; print $_\' < "$1"\n')}
              do_expansion: False
              here_end: EOF
              was_filled: True
              spids: [242]
            )
          ]
        )
      ]
      redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(dump)} spids:[249])]
      spids: [229]
    )
    (C {(chmod)} {(Lit_Other '+') (x)} {(dump)})
    (C {(test_expect_success)} {(SQ <'setup textconv'>)} 
      {
        (SQ <'\n'> <'\techo file diff=foo >.gitattributes &&\n'> 
          <'\tgit config diff.foo.textconv "\\"$(pwd)\\""/dump\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'rewrite diff respects textconv'>)} 
      {
        (SQ <'\n'> <'\tgit diff -B >diff &&\n'> <'\tgrep "dissimilarity index" diff &&\n'> 
          <'\tgrep "^-61" diff &&\n'> <'\tgrep "^-0" diff\n'>
        )
      }
    )
    (C {(test_done)})
  ]
)