(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:test_description)
          op: Equal
          rhs: 
            {
              (SQ <"Pathnames with funny characters.\n"> <"\n"> 
                <"This test tries pathnames with funny characters in the working\n"> <"tree, index, and tree objects.\n">
              )
            }
          spids: [13]
        )
      ]
      spids: [13]
    )
    (C {(.)} {(./test-lib.sh)})
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:HT) op:Equal rhs:{(SQ <"\t">)} spids:[27])]
      spids: [27]
    )
    (AndOr
      children: [
        (C {(test_have_prereq)} {(MINGW)})
        (SimpleCommand
          words: [{(echo)}]
          redirects: [
            (Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[41])
            (Redir
              op_id: Redir_Great
              fd: -1
              arg_word: {(DQ ("Name with an") (${ VSub_Name HT) (HT))}
              spids: [44]
            )
          ]
        )
      ]
      op_id: Op_DPipe
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Pipeline
              children: [(C {(test)} {(-f)} {(DQ ("Name with an") (${ VSub_Name HT) (HT))})]
              negated: True
            )
          ]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:skip_all)
                  op: Equal
                  rhs: {(SQ <"Your filesystem does not allow tabs in filenames">)}
                  spids: [77]
                )
              ]
              spids: [77]
            )
            (C {(test_done)})
          ]
          spids: [-1 70]
        )
      ]
      spids: [-1 85]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:p0) op:Equal rhs:{(SQ <no-funny>)} spids:[88])]
      spids: [88]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:p1)
          op: Equal
          rhs: {(SQ <"tabs\t,\" (dq) and spaces">)}
          spids: [93]
        )
      ]
      spids: [93]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:p2) op:Equal rhs:{(SQ <"just space">)} spids:[98])]
      spids: [98]
    )
    (C {(test_expect_success)} {(SQ <setup>)} 
      {
        (SQ <"\n"> <"\tcat >\"$p0\" <<-\\EOF &&\n"> 
          <"\t1. A quick brown fox jumps over the lazy cat, oops dog.\n"> <"\t2. A quick brown fox jumps over the lazy cat, oops dog.\n"> 
          <"\t3. A quick brown fox jumps over the lazy cat, oops dog.\n"> <"\tEOF\n"> <"\n"> <"\t{ cat \"$p0\" >\"$p1\" || :; } &&\n"> 
          <"\t{ echo \"Foo Bar Baz\" >\"$p2\" || :; }\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"setup: populate index and tree">)} 
      {(SQ <"\n"> <"\tgit update-index --add \"$p0\" \"$p2\" &&\n"> <"\tt0=$(git write-tree)\n">)}
    )
    (C {(test_expect_success)} {(SQ <"ls-files prints space in filename verbatim">)} 
      {
        (SQ <"\n"> <"\tprintf \"%s\\n\" \"just space\" no-funny >expected &&\n"> 
          <"\tgit ls-files >current &&\n"> <"\ttest_cmp expected current\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"setup: add funny filename">)} 
      {(SQ <"\n"> <"\tgit update-index --add \"$p1\" &&\n"> <"\tt1=$(git write-tree)\n">)}
    )
    (C {(test_expect_success)} {(SQ <"ls-files quotes funny filename">)} 
      {
        (SQ <"\n"> <"\tcat >expected <<-\\EOF &&\n"> <"\tjust space\n"> <"\tno-funny\n"> 
          <"\t\"tabs\\t,\\\" (dq) and spaces\"\n"> <"\tEOF\n"> <"\tgit ls-files >current &&\n"> <"\ttest_cmp expected current\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"ls-files -z does not quote funny filename">)} 
      {
        (SQ <"\n"> <"\tcat >expected <<-\\EOF &&\n"> <"\tjust space\n"> <"\tno-funny\n"> 
          <"\ttabs\t,\" (dq) and spaces\n"> <"\tEOF\n"> <"\tgit ls-files -z >ls-files.z &&\n"> 
          <"\tperl -pe \"y/\\000/\\012/\" <ls-files.z >current &&\n"> <"\ttest_cmp expected current\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"ls-tree quotes funny filename">)} 
      {
        (SQ <"\n"> <"\tcat >expected <<-\\EOF &&\n"> <"\tjust space\n"> <"\tno-funny\n"> 
          <"\t\"tabs\\t,\\\" (dq) and spaces\"\n"> <"\tEOF\n"> <"\tgit ls-tree -r $t1 >ls-tree &&\n"> 
          <"\tsed -e \"s/^[^\t]*\t//\" <ls-tree >current &&\n"> <"\ttest_cmp expected current\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"diff-index --name-status quotes funny filename">)} 
      {
        (SQ <"\n"> <"\tcat >expected <<-\\EOF &&\n"> <"\tA\t\"tabs\\t,\\\" (dq) and spaces\"\n"> 
          <"\tEOF\n"> <"\tgit diff-index --name-status $t0 >current &&\n"> <"\ttest_cmp expected current\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"diff-tree --name-status quotes funny filename">)} 
      {
        (SQ <"\n"> <"\tcat >expected <<-\\EOF &&\n"> <"\tA\t\"tabs\\t,\\\" (dq) and spaces\"\n"> 
          <"\tEOF\n"> <"\tgit diff-tree --name-status $t0 $t1 >current &&\n"> <"\ttest_cmp expected current\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"diff-index -z does not quote funny filename">)} 
      {
        (SQ <"\n"> <"\tcat >expected <<-\\EOF &&\n"> <"\tA\n"> <"\ttabs\t,\" (dq) and spaces\n"> 
          <"\tEOF\n"> <"\tgit diff-index -z --name-status $t0 >diff-index.z &&\n"> 
          <"\tperl -pe \"y/\\000/\\012/\" <diff-index.z >current &&\n"> <"\ttest_cmp expected current\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"diff-tree -z does not quote funny filename">)} 
      {
        (SQ <"\n"> <"\tcat >expected <<-\\EOF &&\n"> <"\tA\n"> <"\ttabs\t,\" (dq) and spaces\n"> 
          <"\tEOF\n"> <"\tgit diff-tree -z --name-status $t0 $t1 >diff-tree.z &&\n"> 
          <"\tperl -pe y/\\\\000/\\\\012/ <diff-tree.z >current &&\n"> <"\ttest_cmp expected current\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"diff-tree --find-copies-harder quotes funny filename">)} 
      {
        (SQ <"\n"> <"\tcat >expected <<-\\EOF &&\n"> 
          <"\tCNUM\tno-funny\t\"tabs\\t,\\\" (dq) and spaces\"\n"> <"\tEOF\n"> <"\tgit diff-tree -C --find-copies-harder --name-status $t0 $t1 >out &&\n"> 
          <"\tsed -e \"s/^C[0-9]*/CNUM/\" <out >current &&\n"> <"\ttest_cmp expected current\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"setup: remove unfunny index entry">)} 
      {(SQ <"\n"> <"\tgit update-index --force-remove \"$p0\"\n">)}
    )
    (C {(test_expect_success)} {(SQ <"diff-tree -M quotes funny filename">)} 
      {
        (SQ <"\n"> <"\tcat >expected <<-\\EOF &&\n"> 
          <"\tRNUM\tno-funny\t\"tabs\\t,\\\" (dq) and spaces\"\n"> <"\tEOF\n"> <"\tgit diff-index -M --name-status $t0 >out &&\n"> 
          <"\tsed -e \"s/^R[0-9]*/RNUM/\" <out >current &&\n"> <"\ttest_cmp expected current\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"diff-index -M -p quotes funny filename">)} 
      {
        (SQ <"\n"> <"\tcat >expected <<-\\EOF &&\n"> 
          <"\tdiff --git a/no-funny \"b/tabs\\t,\\\" (dq) and spaces\"\n"> <"\tsimilarity index NUM%\n"> <"\trename from no-funny\n"> 
          <"\trename to \"tabs\\t,\\\" (dq) and spaces\"\n"> <"\tEOF\n"> <"\tgit diff-index -M -p $t0 >diff &&\n"> 
          <"\tsed -e \"s/index [0-9]*%/index NUM%/\" <diff >current &&\n"> <"\ttest_cmp expected current\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"setup: mode change">)} {(SQ <"\n"> <"\tchmod +x \"$p1\"\n">)})
    (C {(test_expect_success)} {(SQ <"diff-index -M -p with mode change quotes funny filename">)} 
      {
        (SQ <"\n"> <"\tcat >expected <<-\\EOF &&\n"> 
          <"\tdiff --git a/no-funny \"b/tabs\\t,\\\" (dq) and spaces\"\n"> <"\told mode 100644\n"> <"\tnew mode 100755\n"> <"\tsimilarity index NUM%\n"> 
          <"\trename from no-funny\n"> <"\trename to \"tabs\\t,\\\" (dq) and spaces\"\n"> <"\tEOF\n"> 
          <"\tgit diff-index -M -p $t0 >diff &&\n"> <"\tsed -e \"s/index [0-9]*%/index NUM%/\" <diff >current &&\n"> <"\ttest_cmp expected current\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"diffstat for rename quotes funny filename">)} 
      {
        (SQ <"\n"> <"\tcat >expected <<-\\EOF &&\n"> <"\t \"tabs\\t,\\\" (dq) and spaces\"\n"> 
          <"\t 1 file changed, 0 insertions(+), 0 deletions(-)\n"> <"\tEOF\n"> <"\tgit diff-index -M -p $t0 >diff &&\n"> <"\tgit apply --stat <diff >diffstat &&\n"> 
          <"\tsed -e \"s/|.*//\" -e \"s/ *\\$//\" <diffstat >current &&\n"> <"\ttest_i18ncmp expected current\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"numstat for rename quotes funny filename">)} 
      {
        (SQ <"\n"> <"\tcat >expected <<-\\EOF &&\n"> <"\t0\t0\t\"tabs\\t,\\\" (dq) and spaces\"\n"> 
          <"\tEOF\n"> <"\tgit diff-index -M -p $t0 >diff &&\n"> <"\tgit apply --numstat <diff >current &&\n"> 
          <"\ttest_cmp expected current\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"numstat without -M quotes funny filename">)} 
      {
        (SQ <"\n"> <"\tcat >expected <<-\\EOF &&\n"> <"\t0\t3\tno-funny\n"> 
          <"\t3\t0\t\"tabs\\t,\\\" (dq) and spaces\"\n"> <"\tEOF\n"> <"\tgit diff-index -p $t0 >diff &&\n"> <"\tgit apply --numstat <diff >current &&\n"> 
          <"\ttest_cmp expected current\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"numstat for non-git rename diff quotes funny filename">)} 
      {
        (SQ <"\n"> <"\tcat >expected <<-\\EOF &&\n"> <"\t0\t3\tno-funny\n"> 
          <"\t3\t0\t\"tabs\\t,\\\" (dq) and spaces\"\n"> <"\tEOF\n"> <"\tgit diff-index -p $t0 >git-diff &&\n"> <"\tsed -ne \"/^[-+@]/p\" <git-diff >diff &&\n"> 
          <"\tgit apply --numstat <diff >current &&\n"> <"\ttest_cmp expected current\n">
        )
      }
    )
    (C {(test_done)})
  ]
)