(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:'prune $GIT_DIR/worktrees' span_id:6))}
          spids: [4]
        )
      ]
    )
    (C {(.)} {(./test-lib.sh)})
    (C {(test_expect_success)} {(initialize)} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:20) 
          (Token id:Id.Lit_Chars val:'\tgit commit --allow-empty -m init\n' span_id:21)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'worktree prune on normal repo' span_id:28))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:32) 
          (Token id:Id.Lit_Chars val:'\tgit worktree prune &&\n' span_id:33) (Token id:Id.Lit_Chars val:'\ttest_must_fail git worktree prune abc\n' span_id:34)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'prune files inside $GIT_DIR/worktrees' span_id:41))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:45) 
          (Token id:Id.Lit_Chars val:'\tmkdir .git/worktrees &&\n' span_id:46) (Token id:Id.Lit_Chars val:'\t: >.git/worktrees/abc &&\n' span_id:47) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit worktree prune --verbose >actual &&\n'
            span_id: 48
          ) (Token id:Id.Lit_Chars val:'\tcat >expect <<EOF &&\n' span_id:49) 
          (Token
            id: Id.Lit_Chars
            val: 'Removing worktrees/abc: not a valid directory\n'
            span_id: 50
          ) (Token id:Id.Lit_Chars val:'EOF\n' span_id:51) 
          (Token id:Id.Lit_Chars val:'\ttest_i18ncmp expect actual &&\n' span_id:52) (Token id:Id.Lit_Chars val:'\t! test -f .git/worktrees/abc &&\n' span_id:53) 
          (Token id:Id.Lit_Chars val:'\t! test -d .git/worktrees\n' span_id:54)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'prune directories without gitdir' span_id:61))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:65) 
          (Token id:Id.Lit_Chars val:'\tmkdir -p .git/worktrees/def/abc &&\n' span_id:66) (Token id:Id.Lit_Chars val:'\t: >.git/worktrees/def/def &&\n' span_id:67) 
          (Token id:Id.Lit_Chars val:'\tcat >expect <<EOF &&\n' span_id:68) (Token id:Id.Lit_Chars val:'Removing worktrees/def: gitdir file does not exist\n' span_id:69) 
          (Token id:Id.Lit_Chars val:'EOF\n' span_id:70) (Token id:Id.Lit_Chars val:'\tgit worktree prune --verbose >actual &&\n' span_id:71) 
          (Token id:Id.Lit_Chars val:'\ttest_i18ncmp expect actual &&\n' span_id:72) (Token id:Id.Lit_Chars val:'\t! test -d .git/worktrees/def &&\n' span_id:73) 
          (Token id:Id.Lit_Chars val:'\t! test -d .git/worktrees\n' span_id:74)
        )
      }
    )
    (C {(test_expect_success)} {(SANITY)} 
      {(SQ (Token id:Id.Lit_Chars val:'prune directories with unreadable gitdir' span_id:83))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:87) 
          (Token id:Id.Lit_Chars val:'\tmkdir -p .git/worktrees/def/abc &&\n' span_id:88) (Token id:Id.Lit_Chars val:'\t: >.git/worktrees/def/def &&\n' span_id:89) 
          (Token id:Id.Lit_Chars val:'\t: >.git/worktrees/def/gitdir &&\n' span_id:90) (Token id:Id.Lit_Chars val:'\tchmod u-r .git/worktrees/def/gitdir &&\n' span_id:91) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit worktree prune --verbose >actual &&\n'
            span_id: 92
          ) 
          (Token
            id: Id.Lit_Chars
            val: '\ttest_i18ngrep "Removing worktrees/def: unable to read gitdir file" actual &&\n'
            span_id: 93
          ) (Token id:Id.Lit_Chars val:'\t! test -d .git/worktrees/def &&\n' span_id:94) 
          (Token id:Id.Lit_Chars val:'\t! test -d .git/worktrees\n' span_id:95)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'prune directories with invalid gitdir' span_id:102))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:106) 
          (Token id:Id.Lit_Chars val:'\tmkdir -p .git/worktrees/def/abc &&\n' span_id:107) (Token id:Id.Lit_Chars val:'\t: >.git/worktrees/def/def &&\n' span_id:108) 
          (Token id:Id.Lit_Chars val:'\t: >.git/worktrees/def/gitdir &&\n' span_id:109) (Token id:Id.Lit_Chars val:'\tgit worktree prune --verbose >actual &&\n' span_id:110) 
          (Token
            id: Id.Lit_Chars
            val: '\ttest_i18ngrep "Removing worktrees/def: invalid gitdir file" actual &&\n'
            span_id: 111
          ) (Token id:Id.Lit_Chars val:'\t! test -d .git/worktrees/def &&\n' span_id:112) 
          (Token id:Id.Lit_Chars val:'\t! test -d .git/worktrees\n' span_id:113)
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'prune directories with gitdir pointing to nowhere'
            span_id: 120
          )
        )
      } 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:124) 
          (Token id:Id.Lit_Chars val:'\tmkdir -p .git/worktrees/def/abc &&\n' span_id:125) (Token id:Id.Lit_Chars val:'\t: >.git/worktrees/def/def &&\n' span_id:126) 
          (Token
            id: Id.Lit_Chars
            val: '\techo "$(pwd)"/nowhere >.git/worktrees/def/gitdir &&\n'
            span_id: 127
          ) (Token id:Id.Lit_Chars val:'\tgit worktree prune --verbose >actual &&\n' span_id:128) 
          (Token
            id: Id.Lit_Chars
            val: 
'\ttest_i18ngrep "Removing worktrees/def: gitdir file points to non-existent location" actual &&\n'
            span_id: 129
          ) (Token id:Id.Lit_Chars val:'\t! test -d .git/worktrees/def &&\n' span_id:130) 
          (Token id:Id.Lit_Chars val:'\t! test -d .git/worktrees\n' span_id:131)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'not prune locked checkout' span_id:138))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:142) 
          (Token
            id: Id.Lit_Chars
            val: '\ttest_when_finished rm -r .git/worktrees &&\n'
            span_id: 143
          ) (Token id:Id.Lit_Chars val:'\tmkdir -p .git/worktrees/ghi &&\n' span_id:144) 
          (Token id:Id.Lit_Chars val:'\t: >.git/worktrees/ghi/locked &&\n' span_id:145) (Token id:Id.Lit_Chars val:'\tgit worktree prune &&\n' span_id:146) 
          (Token id:Id.Lit_Chars val:'\ttest -d .git/worktrees/ghi\n' span_id:147)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'not prune recent checkouts' span_id:154))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:158) 
          (Token
            id: Id.Lit_Chars
            val: '\ttest_when_finished rm -r .git/worktrees &&\n'
            span_id: 159
          ) (Token id:Id.Lit_Chars val:'\tmkdir zz &&\n' span_id:160) 
          (Token id:Id.Lit_Chars val:'\tmkdir -p .git/worktrees/jlm &&\n' span_id:161) (Token id:Id.Lit_Chars val:'\techo "$(pwd)"/zz >.git/worktrees/jlm/gitdir &&\n' span_id:162) 
          (Token id:Id.Lit_Chars val:'\trmdir zz &&\n' span_id:163) (Token id:Id.Lit_Chars val:'\tgit worktree prune --verbose --expire=2.days.ago &&\n' span_id:164) 
          (Token id:Id.Lit_Chars val:'\ttest -d .git/worktrees/jlm\n' span_id:165)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'not prune proper checkouts' span_id:172))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:176) 
          (Token
            id: Id.Lit_Chars
            val: '\ttest_when_finished rm -r .git/worktrees &&\n'
            span_id: 177
          ) (Token id:Id.Lit_Chars val:'\tgit worktree add --detach "$PWD/nop" master &&\n' span_id:178) 
          (Token id:Id.Lit_Chars val:'\tgit worktree prune &&\n' span_id:179) (Token id:Id.Lit_Chars val:'\ttest -d .git/worktrees/nop\n' span_id:180)
        )
      }
    )
    (C {(test_done)})
  ]
)