(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:'applying patch with mode bits' span_id:6))}
          spids: [4]
        )
      ]
    )
    (C {(.)} {(./test-lib.sh)})
    (C {(test_expect_success)} {(setup)} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:20) 
          (Token id:Id.Lit_Chars val:'\techo original >file &&\n' span_id:21) (Token id:Id.Lit_Chars val:'\tgit add file &&\n' span_id:22) 
          (Token id:Id.Lit_Chars val:'\ttest_tick &&\n' span_id:23) (Token id:Id.Lit_Chars val:'\tgit commit -m initial &&\n' span_id:24) 
          (Token id:Id.Lit_Chars val:'\tgit tag initial &&\n' span_id:25) (Token id:Id.Lit_Chars val:'\techo modified >file &&\n' span_id:26) 
          (Token id:Id.Lit_Chars val:'\tgit diff --stat -p >patch-0.txt &&\n' span_id:27) (Token id:Id.Lit_Chars val:'\tchmod +x file &&\n' span_id:28) 
          (Token id:Id.Lit_Chars val:'\tgit diff --stat -p >patch-1.txt\n' span_id:29)
        )
      }
    )
    (C {(test_expect_success)} {(FILEMODE)} 
      {(SQ (Token id:Id.Lit_Chars val:'same mode (no index)' span_id:38))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:42) 
          (Token id:Id.Lit_Chars val:'\tgit reset --hard &&\n' span_id:43) (Token id:Id.Lit_Chars val:'\tchmod +x file &&\n' span_id:44) 
          (Token id:Id.Lit_Chars val:'\tgit apply patch-0.txt &&\n' span_id:45) (Token id:Id.Lit_Chars val:'\ttest -x file\n' span_id:46)
        )
      }
    )
    (C {(test_expect_success)} {(FILEMODE)} 
      {(SQ (Token id:Id.Lit_Chars val:'same mode (with index)' span_id:55))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:59) 
          (Token id:Id.Lit_Chars val:'\tgit reset --hard &&\n' span_id:60) (Token id:Id.Lit_Chars val:'\tchmod +x file &&\n' span_id:61) 
          (Token id:Id.Lit_Chars val:'\tgit add file &&\n' span_id:62) (Token id:Id.Lit_Chars val:'\tgit apply --index patch-0.txt &&\n' span_id:63) 
          (Token id:Id.Lit_Chars val:'\ttest -x file &&\n' span_id:64) (Token id:Id.Lit_Chars val:'\tgit diff --exit-code\n' span_id:65)
        )
      }
    )
    (C {(test_expect_success)} {(FILEMODE)} 
      {(SQ (Token id:Id.Lit_Chars val:'same mode (index only)' span_id:74))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:78) 
          (Token id:Id.Lit_Chars val:'\tgit reset --hard &&\n' span_id:79) (Token id:Id.Lit_Chars val:'\tchmod +x file &&\n' span_id:80) 
          (Token id:Id.Lit_Chars val:'\tgit add file &&\n' span_id:81) (Token id:Id.Lit_Chars val:'\tgit apply --cached patch-0.txt &&\n' span_id:82) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit ls-files -s file | grep "^100755"\n'
            span_id: 83
          )
        )
      }
    )
    (C {(test_expect_success)} {(FILEMODE)} 
      {(SQ (Token id:Id.Lit_Chars val:'mode update (no index)' span_id:92))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:96) 
          (Token id:Id.Lit_Chars val:'\tgit reset --hard &&\n' span_id:97) (Token id:Id.Lit_Chars val:'\tgit apply patch-1.txt &&\n' span_id:98) 
          (Token id:Id.Lit_Chars val:'\ttest -x file\n' span_id:99)
        )
      }
    )
    (C {(test_expect_success)} {(FILEMODE)} 
      {(SQ (Token id:Id.Lit_Chars val:'mode update (with index)' span_id:108))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:112) 
          (Token id:Id.Lit_Chars val:'\tgit reset --hard &&\n' span_id:113) (Token id:Id.Lit_Chars val:'\tgit apply --index patch-1.txt &&\n' span_id:114) 
          (Token id:Id.Lit_Chars val:'\ttest -x file &&\n' span_id:115) (Token id:Id.Lit_Chars val:'\tgit diff --exit-code\n' span_id:116)
        )
      }
    )
    (C {(test_expect_success)} {(FILEMODE)} 
      {(SQ (Token id:Id.Lit_Chars val:'mode update (index only)' span_id:125))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:129) 
          (Token id:Id.Lit_Chars val:'\tgit reset --hard &&\n' span_id:130) (Token id:Id.Lit_Chars val:'\tgit apply --cached patch-1.txt &&\n' span_id:131) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit ls-files -s file | grep "^100755"\n'
            span_id: 132
          )
        )
      }
    )
    (C {(test_done)})
  ]
)