(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:test_description) op: assign_op.Equal rhs: { (SQ <'basic ls-files tests\n'> <'\n'> <'This test runs git ls-files with various unusual or malformed\n'> <'command-line arguments.\n'> ) } spids: [4] ) ] ) (C {<.>} {<'./test-lib.sh'>}) (command.Simple redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<empty>})] do_fork: F ) (C {<test_expect_success>} {(SQ <'ls-files in empty repository'>)} {(SQ <'\n'> <'\tgit ls-files >actual &&\n'> <'\ttest_cmp empty actual\n'>)} ) (C {<test_expect_success>} {(SQ <'ls-files with nonexistent path'>)} {(SQ <'\n'> <'\tgit ls-files doesnotexist >actual &&\n'> <'\ttest_cmp empty actual\n'>)} ) (C {<test_expect_success>} {(SQ <'ls-files with nonsense option'>)} { (SQ <'\n'> <'\ttest_expect_code 129 git ls-files --nonsense 2>actual &&\n'> <'\ttest_i18ngrep "[Uu]sage: git ls-files" actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'ls-files -h in corrupt repository'>)} { (SQ <'\n'> <'\tmkdir broken &&\n'> <'\t(\n'> <'\t\tcd broken &&\n'> <'\t\tgit init &&\n'> <'\t\t>.git/index &&\n'> <'\t\ttest_expect_code 129 git ls-files -h >usage 2>&1\n'> <'\t) &&\n'> <'\ttest_i18ngrep "[Uu]sage: git ls-files " broken/usage\n'> ) } ) (C {<test_expect_success>} {<SYMLINKS>} {(SQ <'ls-files with absolute paths to symlinks'>)} { (SQ <'\n'> <'\tmkdir subs &&\n'> <'\tln -s nosuch link &&\n'> <'\tln -s ../nosuch subs/link &&\n'> <'\tgit add link subs/link &&\n'> <'\tgit ls-files -s link subs/link >expect &&\n'> <'\tgit ls-files -s "$(pwd)/link" "$(pwd)/subs/link" >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\n'> <'\t(\n'> <'\t\tcd subs &&\n'> <'\t\tgit ls-files -s link >../expect &&\n'> <'\t\tgit ls-files -s "$(pwd)/link" >../actual\n'> <'\t) &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_done>}) ] )