(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:test_description)
          op: assign_op.Equal
          rhs: {(SQ <'Basic subproject functionality'>)}
          spids: [4]
        )
      ]
    )
    (C {<.>} {<'./test-lib.sh'>})
    (C {<test_expect_success>} {(SQ <'setup: create superproject'>)} 
      {
        (SQ <'\n'> <'\t: >Makefile &&\n'> <'\tgit add Makefile &&\n'> 
          <'\tgit commit -m "Superproject created"\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'setup: create subprojects'>)} 
      {
        (SQ <'\n'> <'\tmkdir sub1 &&\n'> <'\t( cd sub1 && git init && : >Makefile && git add * &&\n'> 
          <'\tgit commit -q -m "subproject 1" ) &&\n'> <'\tmkdir sub2 &&\n'> <'\t( cd sub2 && git init && : >Makefile && git add * &&\n'> 
          <'\tgit commit -q -m "subproject 2" ) &&\n'> <'\tgit update-index --add sub1 &&\n'> <'\tgit add sub2 &&\n'> 
          <'\tgit commit -q -m "subprojects added" &&\n'> <'\tgit diff-tree --abbrev=5 HEAD^ HEAD |cut -d" " -f-3,5- >current &&\n'> 
          <'\tgit branch save HEAD &&\n'> <'\tcat >expected <<-\\EOF &&\n'> <'\t:000000 160000 00000... A\tsub1\n'> 
          <'\t:000000 160000 00000... A\tsub2\n'> <'\tEOF\n'> <'\ttest_cmp expected current\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'check if fsck ignores the subprojects'>)} 
      {(SQ <'\n'> <'\tgit fsck --full\n'>)}
    )
    (C {<test_expect_success>} {(SQ <'check if commit in a subproject detected'>)} 
      {
        (SQ <'\n'> <'\t( cd sub1 &&\n'> <'\techo "all:" >>Makefile &&\n'> 
          <'\techo "\ttrue" >>Makefile &&\n'> <'\tgit commit -q -a -m "make all" ) &&\n'> <'\ttest_expect_code 1 git diff-files --exit-code\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'check if a changed subproject HEAD can be committed'>)} 
      {
        (SQ <'\n'> <'\tgit commit -q -a -m "sub1 changed" &&\n'> 
          <'\ttest_expect_code 1 git diff-tree --exit-code HEAD^ HEAD\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'check if diff-index works for subproject elements'>)} 
      {(SQ <'\n'> <'\ttest_expect_code 1 git diff-index --exit-code --cached save -- sub1\n'>)}
    )
    (C {<test_expect_success>} {(SQ <'check if diff-tree works for subproject elements'>)} 
      {(SQ <'\n'> <'\ttest_expect_code 1 git diff-tree --exit-code HEAD^ HEAD -- sub1\n'>)}
    )
    (C {<test_expect_success>} {(SQ <'check if git diff works for subproject elements'>)} 
      {(SQ <'\n'> <'\ttest_expect_code 1 git diff --exit-code HEAD^ HEAD\n'>)}
    )
    (C {<test_expect_success>} {(SQ <'check if clone works'>)} 
      {
        (SQ <'\n'> <'\tgit ls-files -s >expected &&\n'> <'\tgit clone -l -s . cloned &&\n'> 
          <'\t( cd cloned && git ls-files -s ) >current &&\n'> <'\ttest_cmp expected current\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'removing and adding subproject'>)} 
      {
        (SQ <'\n'> <'\tgit update-index --force-remove -- sub2 &&\n'> <'\tmv sub2 sub3 &&\n'> 
          <'\tgit add sub3 &&\n'> <'\tgit commit -q -m "renaming a subproject" &&\n'> 
          <'\ttest_expect_code 1 git diff -M --name-status --exit-code HEAD^ HEAD\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'checkout in superproject'>)} 
      {
        (SQ <'\n'> <'\tgit checkout save &&\n'> 
          <'\tgit diff-index --exit-code --raw --cached save -- sub1\n'>
        )
      }
    )
    (C {<test_done>})
  ]
)