(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:test_description)
          op: assign_op.Equal
          rhs: 
            {
              (SQ (Token id:Id.Lit_Chars val:'git update-index nonsense-path test.\n' span_id:15) 
                (Token id:Id.Lit_Chars val:'\n' span_id:16) (Token id:Id.Lit_Chars val:'This test creates the following structure in the cache:\n' span_id:17) 
                (Token id:Id.Lit_Chars val:'\n' span_id:18) (Token id:Id.Lit_Chars val:'    path0       - a file\n' span_id:19) 
                (Token
                  id: Id.Lit_Chars
                  val: '    path1       - a symlink\n'
                  span_id: 20
                ) (Token id:Id.Lit_Chars val:'    path2/file2 - a file in a directory\n' span_id:21) 
                (Token
                  id: Id.Lit_Chars
                  val: '    path3/file3 - a file in a directory\n'
                  span_id: 22
                ) (Token id:Id.Lit_Chars val:'\n' span_id:23) 
                (Token
                  id: Id.Lit_Chars
                  val: 'and tries to git update-index --add the following:\n'
                  span_id: 24
                ) (Token id:Id.Lit_Chars val:'\n' span_id:25) 
                (Token
                  id: Id.Lit_Chars
                  val: '    path0/file0 - a file in a directory\n'
                  span_id: 26
                ) (Token id:Id.Lit_Chars val:'    path1/file1 - a file in a directory\n' span_id:27) 
                (Token id:Id.Lit_Chars val:'    path2       - a file\n' span_id:28) (Token id:Id.Lit_Chars val:'    path3       - a symlink\n' span_id:29) 
                (Token id:Id.Lit_Chars val:'\n' span_id:30) (Token id:Id.Lit_Chars val:'All of the attempts should fail.\n' span_id:31)
              )
            }
          spids: [13]
        )
      ]
    )
    (C {(.)} {(./test-lib.sh)})
    (C {(mkdir)} {(path2)} {(path3)})
    (command.Simple
      words: [{(date)}]
      redirects: [
        (redir.Redir op:(Token id:Id.Redir_Great val:'>' span_id:48) fd:-1 arg_word:{(path0)})
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [(C {(test_have_prereq)} {(SYMLINKS)})]
          action: [(C {(ln)} {(-s)} {(xyzzy)} {(path1)})]
          spids: [51 57]
        )
      ]
      else_action: [
        (command.Simple
          words: [{(date)}]
          redirects: [
            (redir.Redir
              op: (Token id:Id.Redir_Great val:'>' span_id:73)
              fd: -1
              arg_word: {(path1)}
            )
          ]
        )
      ]
    )
    (command.Simple
      words: [{(date)}]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:81)
          fd: -1
          arg_word: {(path2/file2)}
        )
      ]
    )
    (command.Simple
      words: [{(date)}]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:86)
          fd: -1
          arg_word: {(path3/file3)}
        )
      ]
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'git update-index --add to add various paths.' span_id:95))} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'git update-index --add -- path0 path1 path2/file2 path3/file3'
            span_id: 101
          )
        )
      }
    )
    (C {(rm)} {(-fr)} {(path) (Id.Lit_QMark '?')})
    (C {(mkdir)} {(path0)} {(path1)})
    (command.Simple
      words: [{(date)}]
      redirects: [
        (redir.Redir op:(Token id:Id.Redir_Great val:'>' span_id:121) fd:-1 arg_word:{(path2)})
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [(C {(test_have_prereq)} {(SYMLINKS)})]
          action: [(C {(ln)} {(-s)} {(frotz)} {(path3)})]
          spids: [124 130]
        )
      ]
      else_action: [
        (command.Simple
          words: [{(date)}]
          redirects: [
            (redir.Redir
              op: (Token id:Id.Redir_Great val:'>' span_id:146)
              fd: -1
              arg_word: {(path3)}
            )
          ]
        )
      ]
    )
    (command.Simple
      words: [{(date)}]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:154)
          fd: -1
          arg_word: {(path0/file0)}
        )
      ]
    )
    (command.Simple
      words: [{(date)}]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:159)
          fd: -1
          arg_word: {(path1/file1)}
        )
      ]
    )
    (command.ForEach
      iter_name: p
      iter_words: [{(path0/file0)} {(path1/file1)} {(path2)} {(path3)}]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (C {(test_expect_success)} 
              {
                (DQ ('git update-index to add conflicting path ') ($ Id.VSub_DollarName '$p') 
                  (' should fail.')
                )
              } {(DQ ('test_must_fail git update-index --add -- ') ($ Id.VSub_DollarName '$p'))}
            )
          ]
        )
    )
    (C {(test_done)})
  ]
)