(command.CommandList children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:test_description) 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'> ) } ) ] ) (C {(.)} {(./test-lib.sh)}) (C {(mkdir)} {(path2)} {(path3)}) (command.SimpleCommand words: [{(date)}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(path0)})] ) (command.If arms: [ (if_arm cond: [(C {(test_have_prereq)} {(SYMLINKS)})] action: [(C {(ln)} {(-s)} {(xyzzy)} {(path1)})] ) ] else_action: [ (command.SimpleCommand words: [{(date)}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(path1)})] ) ] ) (command.SimpleCommand words: [{(date)}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(path2/file2)})] ) (command.SimpleCommand words: [{(date)}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(path3/file3)})] ) (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) (Lit_Other '?')}) (C {(mkdir)} {(path0)} {(path1)}) (command.SimpleCommand words: [{(date)}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(path2)})] ) (command.If arms: [ (if_arm cond: [(C {(test_have_prereq)} {(SYMLINKS)})] action: [(C {(ln)} {(-s)} {(frotz)} {(path3)})] ) ] else_action: [ (command.SimpleCommand words: [{(date)}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(path3)})] ) ] ) (command.SimpleCommand words: [{(date)}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(path0/file0)})] ) (command.SimpleCommand words: [{(date)}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 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 ') ($ VSub_DollarName '$p') (' should fail.') ) } {(DQ ('test_must_fail git update-index --add -- ') ($ VSub_DollarName '$p'))} ) ] ) ) (C {(test_done)}) ] )