(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:test_description)
          op: assign_op.Equal
          rhs: 
            {
              (SQ <'git update-index nonsense-path test.\n'> <'\n'> 
                <'This test creates the following structure in the cache:\n'> <'\n'> <'    path0       - a file\n'> <'    path1       - a symlink\n'> 
                <'    path2/file2 - a file in a directory\n'> <'    path3/file3 - a file in a directory\n'> <'\n'> 
                <'and tries to git update-index --add the following:\n'> <'\n'> <'    path0/file0 - a file in a directory\n'> <'    path1/file1 - a file in a directory\n'> 
                <'    path2       - a file\n'> <'    path3       - a symlink\n'> <'\n'> <'All of the attempts should fail.\n'>
              )
            }
          spids: [13]
        )
      ]
    )
    (C {<.>} {<'./test-lib.sh'>})
    (C {<mkdir>} {<path2>} {<path3>})
    (command.Simple
      words: [{<date>}]
      redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<path0>})]
      do_fork: T
    )
    (command.If
      arms: [
        (if_arm
          cond: (condition.Shell commands:[(C {<test_have_prereq>} {<SYMLINKS>})])
          action: [(C {<ln>} {<-s>} {<xyzzy>} {<path1>})]
          spids: [51 57]
        )
      ]
      else_action: [
        (command.Simple
          words: [{<date>}]
          redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<path1>})]
          do_fork: T
        )
      ]
    )
    (command.Simple
      words: [{<date>}]
      redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'path2/file2'>})]
      do_fork: T
    )
    (command.Simple
      words: [{<date>}]
      redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'path3/file3'>})]
      do_fork: T
    )
    (C {<test_expect_success>} {(SQ <'git update-index --add to add various paths.'>)} 
      {(SQ <'git update-index --add -- path0 path1 path2/file2 path3/file3'>)}
    )
    (C {<rm>} {<-fr>} {<path> <Id.Lit_QMark '?'>})
    (C {<mkdir>} {<path0>} {<path1>})
    (command.Simple
      words: [{<date>}]
      redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<path2>})]
      do_fork: T
    )
    (command.If
      arms: [
        (if_arm
          cond: (condition.Shell commands:[(C {<test_have_prereq>} {<SYMLINKS>})])
          action: [(C {<ln>} {<-s>} {<frotz>} {<path3>})]
          spids: [124 130]
        )
      ]
      else_action: [
        (command.Simple
          words: [{<date>}]
          redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<path3>})]
          do_fork: T
        )
      ]
    )
    (command.Simple
      words: [{<date>}]
      redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'path0/file0'>})]
      do_fork: T
    )
    (command.Simple
      words: [{<date>}]
      redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'path1/file1'>})]
      do_fork: T
    )
    (command.ForEach
      iter_names: [p]
      iterable: (for_iter.Words words:[{<'path0/file0'>} {<'path1/file1'>} {<path2>} {<path3>}])
      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>})
  ]
)