(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:'test log -L' span_id:6))}
          spids: [4]
        )
      ]
    )
    (C {(.)} {(./test-lib.sh)})
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'setup (import history)' span_id:17))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:21) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit fast-import < "$TEST_DIRECTORY"/t4211/history.export &&\n'
            span_id: 22
          ) (Token id:Id.Lit_Chars val:'\tgit reset --hard\n' span_id:23)
        )
      }
    )
    (command.ShFunction
      name: canned_test_1
      body: 
        (command.BraceGroup
          children: [
            (C {(test_expect_) ($ Id.VSub_Number '$1')} {(DQ ($ Id.VSub_Number '$2'))} 
              {
                (DQ ('\n') ('\t\tgit log ') ($ Id.VSub_Number '$2') (' >actual &&\n') ('\t\ttest_cmp ') 
                  (word_part.EscapedLiteral
                    token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:48)
                  ) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\$' span_id:49)) (TEST_DIRECTORY) 
                  (word_part.EscapedLiteral
                    token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:51)
                  ) (/t4211/expect.) ($ Id.VSub_Number '$3') (' actual\n') ('\t')
                )
              }
            )
          ]
        )
    )
    (command.ShFunction
      name: canned_test
      body: 
        (command.BraceGroup
          children: [(C {(canned_test_1)} {(success)} {(DQ ($ Id.VSub_At '$@'))})]
        )
    )
    (command.ShFunction
      name: canned_test_failure
      body: 
        (command.BraceGroup
          children: [(C {(canned_test_1)} {(failure)} {(DQ ($ Id.VSub_At '$@'))})]
        )
    )
    (command.ShFunction
      name: test_bad_opts
      body: 
        (command.BraceGroup
          children: [
            (C {(test_expect_success)} {(DQ ('invalid args: ') ($ Id.VSub_Number '$1'))} 
              {
                (DQ ('\n') ('\t\ttest_must_fail git log ') ($ Id.VSub_Number '$1') (' 2>errors &&\n') 
                  ("\t\tgrep '") ($ Id.VSub_Number '$2') ("' errors\n") ('\t')
                )
              }
            )
          ]
        )
    )
    (C {(canned_test)} {(DQ ('-L 4,12:a.c simple'))} {(simple-f)})
    (C {(canned_test)} {(DQ ('-L 4,+9:a.c simple'))} {(simple-f)})
    (C {(canned_test)} {(DQ ("-L '/long f/,/^}/:a.c' simple"))} {(simple-f)})
    (C {(canned_test)} {(DQ ('-L :f:a.c simple'))} {(simple-f-to-main)})
    (C {(canned_test)} {(DQ ("-L '/main/,/^}/:a.c' simple"))} {(simple-main)})
    (C {(canned_test)} {(DQ ('-L :main:a.c simple'))} {(simple-main-to-end)})
    (C {(canned_test)} {(DQ ('-L 1,+4:a.c simple'))} {(beginning-of-file)})
    (C {(canned_test)} {(DQ ('-L 20:a.c simple'))} {(end-of-file)})
    (C {(canned_test)} {(DQ ("-L '/long f/',/^}/:a.c -L /main/,/^}/:a.c simple"))} {(two-ranges)})
    (C {(canned_test)} {(DQ ('-L 24,+1:a.c simple'))} {(vanishes-early)})
    (C {(canned_test)} {(DQ ("-M -L '/long f/,/^}/:b.c' move-support"))} {(move-support-f)})
    (C {(canned_test)} {(DQ ("-M -L ':f:b.c' parallel-change"))} {(parallel-change-f-to-main)})
    (C {(canned_test)} {(DQ ('-L 4,12:a.c -L :main:a.c simple'))} {(multiple)})
    (C {(canned_test)} {(DQ ('-L 4,18:a.c -L ^:main:a.c simple'))} {(multiple-overlapping)})
    (C {(canned_test)} {(DQ ('-L :main:a.c -L 4,18:a.c simple'))} {(multiple-overlapping)})
    (C {(canned_test)} {(DQ ('-L 4:a.c -L 8,12:a.c simple'))} {(multiple-superset)})
    (C {(canned_test)} {(DQ ('-L 8,12:a.c -L 4:a.c simple'))} {(multiple-superset)})
    (C {(test_bad_opts)} {(DQ (-L))} {(DQ ('switch.*requires a value'))})
    (C {(test_bad_opts)} {(DQ ('-L b.c'))} {(DQ ('argument not .start,end:file'))})
    (C {(test_bad_opts)} {(DQ ('-L 1:'))} {(DQ ('argument not .start,end:file'))})
    (C {(test_bad_opts)} {(DQ ('-L 1:nonexistent'))} {(DQ ('There is no path'))})
    (C {(test_bad_opts)} {(DQ ('-L 1:simple'))} {(DQ ('There is no path'))})
    (C {(test_bad_opts)} {(DQ ("-L '/foo:b.c'"))} {(DQ ('argument not .start,end:file'))})
    (C {(test_bad_opts)} {(DQ ('-L 1000:b.c'))} {(DQ ('has only.*lines'))})
    (C {(test_bad_opts)} {(DQ ('-L 1,1000:b.c'))} {(DQ ('has only.*lines'))})
    (C {(test_bad_opts)} {(DQ ('-L :b.c'))} {(DQ ('argument not .start,end:file'))})
    (C {(test_bad_opts)} {(DQ ('-L :foo:b.c'))} {(DQ ('no match'))})
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'-L X (X == nlines)' span_id:374))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:378) 
          (Token id:Id.Lit_Chars val:'\tn=$(wc -l <b.c) &&\n' span_id:379) (Token id:Id.Lit_Chars val:'\tgit log -L $n:b.c\n' span_id:380)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'-L X (X == nlines + 1)' span_id:387))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:391) 
          (Token id:Id.Lit_Chars val:'\tn=$(expr $(wc -l <b.c) + 1) &&\n' span_id:392) (Token id:Id.Lit_Chars val:'\ttest_must_fail git log -L $n:b.c\n' span_id:393)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'-L X (X == nlines + 2)' span_id:400))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:404) 
          (Token id:Id.Lit_Chars val:'\tn=$(expr $(wc -l <b.c) + 2) &&\n' span_id:405) (Token id:Id.Lit_Chars val:'\ttest_must_fail git log -L $n:b.c\n' span_id:406)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'-L ,Y (Y == nlines)' span_id:413))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:417) 
          (Token id:Id.Lit_Chars val:'\tn=$(printf "%d" $(wc -l <b.c)) &&\n' span_id:418) (Token id:Id.Lit_Chars val:'\tgit log -L ,$n:b.c\n' span_id:419)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'-L ,Y (Y == nlines + 1)' span_id:426))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:430) 
          (Token id:Id.Lit_Chars val:'\tn=$(expr $(wc -l <b.c) + 1) &&\n' span_id:431) (Token id:Id.Lit_Chars val:'\ttest_must_fail git log -L ,$n:b.c\n' span_id:432)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'-L ,Y (Y == nlines + 2)' span_id:439))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:443) 
          (Token id:Id.Lit_Chars val:'\tn=$(expr $(wc -l <b.c) + 2) &&\n' span_id:444) (Token id:Id.Lit_Chars val:'\ttest_must_fail git log -L ,$n:b.c\n' span_id:445)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'-L with --first-parent and a merge' span_id:452))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:456) 
          (Token id:Id.Lit_Chars val:'\tgit checkout parallel-change &&\n' span_id:457) (Token id:Id.Lit_Chars val:'\tgit log --first-parent -L 1,1:b.c\n' span_id:458)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'-L with --output' span_id:465))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:469) 
          (Token id:Id.Lit_Chars val:'\tgit checkout parallel-change &&\n' span_id:470) (Token id:Id.Lit_Chars val:'\tgit log --output=log -L :main:b.c >output &&\n' span_id:471) 
          (Token id:Id.Lit_Chars val:'\ttest ! -s output &&\n' span_id:472) (Token id:Id.Lit_Chars val:'\ttest_line_count = 70 log\n' span_id:473)
        )
      }
    )
    (C {(test_done)})
  ]
)