(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: '"-C <path>" option and its effects on other path-related options'
                  span_id: 6
                )
              )
            }
          spids: [4]
        )
      ]
    )
    (C {(.)} {(./test-lib.sh)})
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '"git -C <path>" runs git from the directory <path>'
            span_id: 18
          )
        )
      } 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:22) 
          (Token id:Id.Lit_Chars val:'\ttest_create_repo dir1 &&\n' span_id:23) (Token id:Id.Lit_Chars val:'\techo 1 >dir1/a.txt &&\n' span_id:24) 
          (Token id:Id.Lit_Chars val:'\tmsg="initial in dir1" &&\n' span_id:25) (Token id:Id.Lit_Chars val:'\t(cd dir1 && git add a.txt && git commit -m "$msg") &&\n' span_id:26) 
          (Token id:Id.Lit_Chars val:'\techo "$msg" >expected &&\n' span_id:27) (Token id:Id.Lit_Chars val:'\tgit -C dir1 log --format=%s >actual &&\n' span_id:28) 
          (Token id:Id.Lit_Chars val:'\ttest_cmp expected actual\n' span_id:29)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'"git -C <path>" with an empty <path> is a no-op' span_id:36))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:40) (Token id:Id.Lit_Chars val:'\t(\n' span_id:41) 
          (Token id:Id.Lit_Chars val:'\t\tmkdir -p dir1/subdir &&\n' span_id:42) (Token id:Id.Lit_Chars val:'\t\tcd dir1/subdir &&\n' span_id:43) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit -C "" rev-parse --show-prefix >actual &&\n'
            span_id: 44
          ) (Token id:Id.Lit_Chars val:'\t\techo subdir/ >expect &&\n' span_id:45) 
          (Token id:Id.Lit_Chars val:'\t\ttest_cmp expect actual\n' span_id:46) (Token id:Id.Lit_Chars val:'\t)\n' span_id:47)
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'Multiple -C options: "-C dir1 -C dir2" is equivalent to "-C dir1/dir2"'
            span_id: 54
          )
        )
      } 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:58) 
          (Token id:Id.Lit_Chars val:'\ttest_create_repo dir1/dir2 &&\n' span_id:59) (Token id:Id.Lit_Chars val:'\techo 1 >dir1/dir2/b.txt &&\n' span_id:60) 
          (Token id:Id.Lit_Chars val:'\tgit -C dir1/dir2 add b.txt &&\n' span_id:61) (Token id:Id.Lit_Chars val:'\tmsg="initial in dir1/dir2" &&\n' span_id:62) 
          (Token id:Id.Lit_Chars val:'\techo "$msg" >expected &&\n' span_id:63) (Token id:Id.Lit_Chars val:'\tgit -C dir1/dir2 commit -m "$msg" &&\n' span_id:64) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit -C dir1 -C dir2 log --format=%s >actual &&\n'
            span_id: 65
          ) (Token id:Id.Lit_Chars val:'\ttest_cmp expected actual\n' span_id:66)
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 
'Effect on --git-dir option: "-C c --git-dir=a.git" is equivalent to "--git-dir c/a.git"'
            span_id: 73
          )
        )
      } 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:77) 
          (Token id:Id.Lit_Chars val:'\tmkdir c &&\n' span_id:78) (Token id:Id.Lit_Chars val:'\tmkdir c/a &&\n' span_id:79) 
          (Token id:Id.Lit_Chars val:'\tmkdir c/a.git &&\n' span_id:80) (Token id:Id.Lit_Chars val:'\t(cd c/a.git && git init --bare) &&\n' span_id:81) 
          (Token id:Id.Lit_Chars val:'\techo 1 >c/a/a.txt &&\n' span_id:82) (Token id:Id.Lit_Chars val:'\tgit --git-dir c/a.git --work-tree=c/a add a.txt &&\n' span_id:83) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit --git-dir c/a.git --work-tree=c/a commit -m "initial" &&\n'
            span_id: 84
          ) (Token id:Id.Lit_Chars val:'\tgit --git-dir=c/a.git log -1 --format=%s >expected &&\n' span_id:85) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit -C c --git-dir=a.git log -1 --format=%s >actual &&\n'
            span_id: 86
          ) (Token id:Id.Lit_Chars val:'\ttest_cmp expected actual\n' span_id:87)
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 
'Order should not matter: "--git-dir=a.git -C c" is equivalent to "-C c --git-dir=a.git"'
            span_id: 94
          )
        )
      } 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:98) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit -C c --git-dir=a.git log -1 --format=%s >expected &&\n'
            span_id: 99
          ) (Token id:Id.Lit_Chars val:'\tgit --git-dir=a.git -C c log -1 --format=%s >actual &&\n' span_id:100) 
          (Token id:Id.Lit_Chars val:'\ttest_cmp expected actual\n' span_id:101)
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 
'Effect on --work-tree option: "-C c/a.git --work-tree=../a"  is equivalent to "--work-tree=c/a --git-dir=c/a.git"'
            span_id: 108
          )
        )
      } 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:112) 
          (Token id:Id.Lit_Chars val:'\trm c/a/a.txt &&\n' span_id:113) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit --git-dir=c/a.git --work-tree=c/a status >expected &&\n'
            span_id: 114
          ) (Token id:Id.Lit_Chars val:'\tgit -C c/a.git --work-tree=../a status >actual &&\n' span_id:115) 
          (Token id:Id.Lit_Chars val:'\ttest_cmp expected actual\n' span_id:116)
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 
'Order should not matter: "--work-tree=../a -C c/a.git" is equivalent to "-C c/a.git --work-tree=../a"'
            span_id: 123
          )
        )
      } 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:127) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit -C c/a.git --work-tree=../a status >expected &&\n'
            span_id: 128
          ) (Token id:Id.Lit_Chars val:'\tgit --work-tree=../a -C c/a.git status >actual &&\n' span_id:129) 
          (Token id:Id.Lit_Chars val:'\ttest_cmp expected actual\n' span_id:130)
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 
'Effect on --git-dir and --work-tree options - "-C c --git-dir=a.git --work-tree=a" is equivalent to "--git-dir=c/a.git --work-tree=c/a"'
            span_id: 137
          )
        )
      } 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:141) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit --git-dir=c/a.git --work-tree=c/a status >expected &&\n'
            span_id: 142
          ) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit -C c --git-dir=a.git --work-tree=a status >actual &&\n'
            span_id: 143
          ) (Token id:Id.Lit_Chars val:'\ttest_cmp expected actual\n' span_id:144)
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 
'Order should not matter: "-C c --git-dir=a.git --work-tree=a" is equivalent to "--git-dir=a.git -C c --work-tree=a"'
            span_id: 151
          )
        )
      } 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:155) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit -C c --git-dir=a.git --work-tree=a status >expected &&\n'
            span_id: 156
          ) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit --git-dir=a.git -C c --work-tree=a status >actual &&\n'
            span_id: 157
          ) (Token id:Id.Lit_Chars val:'\ttest_cmp expected actual\n' span_id:158)
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 
'Order should not matter: "-C c --git-dir=a.git --work-tree=a" is equivalent to "--git-dir=a.git --work-tree=a -C c"'
            span_id: 165
          )
        )
      } 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:169) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit -C c --git-dir=a.git --work-tree=a status >expected &&\n'
            span_id: 170
          ) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit --git-dir=a.git --work-tree=a -C c status >actual &&\n'
            span_id: 171
          ) (Token id:Id.Lit_Chars val:'\ttest_cmp expected actual\n' span_id:172)
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'Relative followed by fullpath: "-C ./here -C /there" is equivalent to "-C /there"'
            span_id: 179
          )
        )
      } 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:183) 
          (Token
            id: Id.Lit_Chars
            val: '\techo "initial in dir1/dir2" >expected &&\n'
            span_id: 184
          ) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit -C dir1 -C "$(pwd)/dir1/dir2" log --format=%s >actual &&\n'
            span_id: 185
          ) (Token id:Id.Lit_Chars val:'\ttest_cmp expected actual\n' span_id:186)
        )
      }
    )
    (C {(test_done)})
  ]
)