(command.CommandList
  children: [
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:test_description spids:[12])
          op: Equal
          rhs: {(SQ <'Clone repositories and store files in Mock LFS'>)}
          spids: [12]
        )
      ]
      spids: [12]
    )
    (C {(.)} {(./lib-git-p4.sh)})
    (command.FuncDef
      name: test_file_is_not_in_mock_lfs
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Op_DAmp Op_DAmp Op_DAmp Op_DAmp]
              children: [
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:FILE spids:[31])
                      op: Equal
                      rhs: {(DQ ($ VSub_Number '$1'))}
                      spids: [31]
                    )
                  ]
                  spids: [31]
                )
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:CONTENT spids:[39])
                      op: Equal
                      rhs: {(DQ ($ VSub_Number '$2'))}
                      spids: [39]
                    )
                  ]
                  spids: [39]
                )
                (command.SimpleCommand
                  words: [{(echo)} {(DQ ($ VSub_Name '$CONTENT'))}]
                  redirects: [
                    (redir.Redir
                      op: <Redir_Great '>'>
                      fd: 16777215
                      arg_word: {(expect_content)}
                    )
                  ]
                )
                (C {(test_path_is_file)} {(DQ ($ VSub_Name '$FILE'))})
                (C {(test_cmp)} {(expect_content)} {(DQ ($ VSub_Name '$FILE'))})
              ]
            )
          ]
          spids: [28]
        )
      spids: [23 27]
    )
    (command.FuncDef
      name: test_file_is_in_mock_lfs
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Op_DAmp Op_DAmp Op_DAmp Op_DAmp Op_DAmp Op_DAmp Op_DAmp Op_DAmp Op_DAmp Op_DAmp Op_DAmp]
              children: [
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:FILE spids:[87])
                      op: Equal
                      rhs: {(DQ ($ VSub_Number '$1'))}
                      spids: [87]
                    )
                  ]
                  spids: [87]
                )
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:CONTENT spids:[95])
                      op: Equal
                      rhs: {(DQ ($ VSub_Number '$2'))}
                      spids: [95]
                    )
                  ]
                  spids: [95]
                )
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:LOCAL_STORAGE spids:[103])
                      op: Equal
                      rhs: {(DQ (.git/mock-storage/local/) ($ VSub_Name '$CONTENT'))}
                      spids: [103]
                    )
                  ]
                  spids: [103]
                )
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:SERVER_STORAGE spids:[112])
                      op: Equal
                      rhs: {(DQ (.git/mock-storage/remote/) ($ VSub_Name '$CONTENT'))}
                      spids: [112]
                    )
                  ]
                  spids: [112]
                )
                (command.SimpleCommand
                  words: [{(echo)} {(DQ (pointer-) ($ VSub_Name '$CONTENT'))}]
                  redirects: [
                    (redir.Redir
                      op: <Redir_Great '>'>
                      fd: 16777215
                      arg_word: {(expect_pointer)}
                    )
                  ]
                )
                (command.SimpleCommand
                  words: [{(echo)} {(DQ ($ VSub_Name '$CONTENT'))}]
                  redirects: [
                    (redir.Redir
                      op: <Redir_Great '>'>
                      fd: 16777215
                      arg_word: {(expect_content)}
                    )
                  ]
                )
                (C {(test_path_is_file)} {(DQ ($ VSub_Name '$FILE'))})
                (C {(test_path_is_file)} {(DQ ($ VSub_Name '$LOCAL_STORAGE'))})
                (C {(test_path_is_file)} {(DQ ($ VSub_Name '$SERVER_STORAGE'))})
                (C {(test_cmp)} {(expect_pointer)} {(DQ ($ VSub_Name '$FILE'))})
                (C {(test_cmp)} {(expect_content)} {(DQ ($ VSub_Name '$LOCAL_STORAGE'))})
                (C {(test_cmp)} {(expect_content)} {(DQ ($ VSub_Name '$SERVER_STORAGE'))})
              ]
            )
          ]
          spids: [84]
        )
      spids: [79 83]
    )
    (command.FuncDef
      name: test_file_is_deleted_in_mock_lfs
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Op_DAmp Op_DAmp Op_DAmp Op_DAmp Op_DAmp Op_DAmp Op_DAmp Op_DAmp Op_DAmp Op_DAmp]
              children: [
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:FILE spids:[214])
                      op: Equal
                      rhs: {(DQ ($ VSub_Number '$1'))}
                      spids: [214]
                    )
                  ]
                  spids: [214]
                )
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:CONTENT spids:[222])
                      op: Equal
                      rhs: {(DQ ($ VSub_Number '$2'))}
                      spids: [222]
                    )
                  ]
                  spids: [222]
                )
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:LOCAL_STORAGE spids:[230])
                      op: Equal
                      rhs: {(DQ (.git/mock-storage/local/) ($ VSub_Name '$CONTENT'))}
                      spids: [230]
                    )
                  ]
                  spids: [230]
                )
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:SERVER_STORAGE spids:[239])
                      op: Equal
                      rhs: {(DQ (.git/mock-storage/remote/) ($ VSub_Name '$CONTENT'))}
                      spids: [239]
                    )
                  ]
                  spids: [239]
                )
                (command.SimpleCommand
                  words: [{(echo)} {(DQ (pointer-) ($ VSub_Name '$CONTENT'))}]
                  redirects: [
                    (redir.Redir
                      op: <Redir_Great '>'>
                      fd: 16777215
                      arg_word: {(expect_pointer)}
                    )
                  ]
                )
                (command.SimpleCommand
                  words: [{(echo)} {(DQ ($ VSub_Name '$CONTENT'))}]
                  redirects: [
                    (redir.Redir
                      op: <Redir_Great '>'>
                      fd: 16777215
                      arg_word: {(expect_content)}
                    )
                  ]
                )
                (C {(test_path_is_missing)} {(DQ ($ VSub_Name '$FILE'))})
                (C {(test_path_is_file)} {(DQ ($ VSub_Name '$LOCAL_STORAGE'))})
                (C {(test_path_is_file)} {(DQ ($ VSub_Name '$SERVER_STORAGE'))})
                (C {(test_cmp)} {(expect_content)} {(DQ ($ VSub_Name '$LOCAL_STORAGE'))})
                (C {(test_cmp)} {(expect_content)} {(DQ ($ VSub_Name '$SERVER_STORAGE'))})
              ]
            )
          ]
          spids: [211]
        )
      spids: [206 210]
    )
    (command.FuncDef
      name: test_file_count_in_dir
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Op_DAmp Op_DAmp Op_DAmp]
              children: [
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:DIR spids:[330])
                      op: Equal
                      rhs: {(DQ ($ VSub_Number '$1'))}
                      spids: [330]
                    )
                  ]
                  spids: [330]
                )
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:EXPECTED_COUNT spids:[338])
                      op: Equal
                      rhs: {(DQ ($ VSub_Number '$2'))}
                      spids: [338]
                    )
                  ]
                  spids: [338]
                )
                (command.SimpleCommand
                  words: [{(find)} {(DQ ($ VSub_Name '$DIR'))} {(-type)} {(f)}]
                  redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(actual)})]
                )
                (C {(test_line_count)} {(Lit_Other '=')} {($ VSub_Name '$EXPECTED_COUNT')} {(actual)})
              ]
            )
          ]
          spids: [327]
        )
      spids: [322 326]
    )
    (C {(test_expect_success)} {(SQ <'start p4d'>)} {(SQ <'\n'> <'\tstart_p4d\n'>)})
    (C {(test_expect_success)} {(SQ <'Create repo with binary files'>)} 
      {
        (SQ <'\n'> <'\tclient_view "//depot/... //client/..." &&\n'> <'\t(\n'> <'\t\tcd "$cli" &&\n'> 
          <'\n'> <'\t\techo "content 1 txt 23 bytes" >file1.txt &&\n'> <'\t\tp4 add file1.txt &&\n'> 
          <'\t\techo "content 2-3 bin 25 bytes" >file2.dat &&\n'> <'\t\tp4 add file2.dat &&\n'> <'\t\tp4 submit -d "Add text and binary file" &&\n'> <'\n'> 
          <'\t\tmkdir "path with spaces" &&\n'> <'\t\techo "content 2-3 bin 25 bytes" >"path with spaces/file3.bin" &&\n'> 
          <'\t\tp4 add "path with spaces/file3.bin" &&\n'> <'\t\tp4 submit -d "Add another binary file with same content and spaces in path" &&\n'> <'\n'> 
          <'\t\techo "content 4 bin 26 bytes XX" >file4.bin &&\n'> <'\t\tp4 add file4.bin &&\n'> <'\t\tp4 submit -d "Add another binary file with different content"\n'> 
          <'\t)\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'Store files in Mock LFS based on size (>24 bytes)'>)} 
      {
        (SQ <'\n'> <'\tclient_view "//depot/... //client/..." &&\n'> 
          <'\ttest_when_finished cleanup_git &&\n'> <'\t(\n'> <'\t\tcd "$git" &&\n'> <'\t\tgit init . &&\n'> 
          <'\t\tgit config git-p4.useClientSpec true &&\n'> <'\t\tgit config git-p4.largeFileSystem MockLFS &&\n'> 
          <'\t\tgit config git-p4.largeFileThreshold 24 &&\n'> <'\t\tgit config git-p4.largeFilePush True &&\n'> 
          <'\t\tgit p4 clone --destination="$git" //depot@all &&\n'> <'\n'> <'\t\ttest_file_is_not_in_mock_lfs file1.txt "content 1 txt 23 bytes" &&\n'> 
          <'\t\ttest_file_is_in_mock_lfs file2.dat "content 2-3 bin 25 bytes" &&\n'> <'\t\ttest_file_is_in_mock_lfs "path with spaces/file3.bin" "content 2-3 bin 25 bytes" &&\n'> 
          <'\t\ttest_file_is_in_mock_lfs file4.bin "content 4 bin 26 bytes XX" &&\n'> <'\n'> <'\t\ttest_file_count_in_dir ".git/mock-storage/local" 2 &&\n'> 
          <'\t\ttest_file_count_in_dir ".git/mock-storage/remote" 2\n'> <'\t)\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'Store files in Mock LFS based on extension (dat)'>)} 
      {
        (SQ <'\n'> <'\tclient_view "//depot/... //client/..." &&\n'> 
          <'\ttest_when_finished cleanup_git &&\n'> <'\t(\n'> <'\t\tcd "$git" &&\n'> <'\t\tgit init . &&\n'> 
          <'\t\tgit config git-p4.useClientSpec true &&\n'> <'\t\tgit config git-p4.largeFileSystem MockLFS &&\n'> 
          <'\t\tgit config git-p4.largeFileExtensions dat &&\n'> <'\t\tgit config git-p4.largeFilePush True &&\n'> 
          <'\t\tgit p4 clone --destination="$git" //depot@all &&\n'> <'\n'> <'\t\ttest_file_is_not_in_mock_lfs file1.txt "content 1 txt 23 bytes" &&\n'> 
          <'\t\ttest_file_is_in_mock_lfs file2.dat "content 2-3 bin 25 bytes" &&\n'> <'\t\ttest_file_is_not_in_mock_lfs "path with spaces/file3.bin" "content 2-3 bin 25 bytes" &&\n'> 
          <'\t\ttest_file_is_not_in_mock_lfs file4.bin "content 4 bin 26 bytes XX" &&\n'> <'\n'> <'\t\ttest_file_count_in_dir ".git/mock-storage/local" 1 &&\n'> 
          <'\t\ttest_file_count_in_dir ".git/mock-storage/remote" 1\n'> <'\t)\n'>
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          <
'Store files in Mock LFS based on extension (dat) and use git p4 sync and no client spec'
          >
        )
      } 
      {
        (SQ <'\n'> <'\ttest_when_finished cleanup_git &&\n'> <'\t(\n'> <'\t\tcd "$git" &&\n'> 
          <'\t\tgit init &&\n'> <'\t\tgit config git-p4.useClientSpec true &&\n'> 
          <'\t\tgit config git-p4.largeFileSystem MockLFS &&\n'> <'\t\tgit config git-p4.largeFileExtensions dat &&\n'> 
          <'\t\tgit config git-p4.largeFilePush True &&\n'> <'\t\tgit p4 sync //depot &&\n'> <'\t\tgit checkout p4/master &&\n'> <'\n'> 
          <'\t\ttest_file_is_not_in_mock_lfs file1.txt "content 1 txt 23 bytes" &&\n'> <'\t\ttest_file_is_in_mock_lfs file2.dat "content 2-3 bin 25 bytes" &&\n'> 
          <
'\t\ttest_file_is_not_in_mock_lfs "path with spaces/file3.bin" "content 2-3 bin 25 bytes" &&\n'
          > <'\t\ttest_file_is_not_in_mock_lfs file4.bin "content 4 bin 26 bytes XX" &&\n'> <'\n'> 
          <'\t\ttest_file_count_in_dir ".git/mock-storage/local" 1 &&\n'> <'\t\ttest_file_count_in_dir ".git/mock-storage/remote" 1\n'> <'\t)\n'>
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ <'Remove file from repo and store files in Mock LFS based on size (>24 bytes)'>)} 
      {
        (SQ <'\n'> <'\tclient_view "//depot/... //client/..." &&\n'> <'\t(\n'> <'\t\tcd "$cli" &&\n'> 
          <'\t\tp4 delete file4.bin &&\n'> <'\t\tp4 submit -d "Remove file"\n'> <'\t) &&\n'> <'\n'> 
          <'\tclient_view "//depot/... //client/..." &&\n'> <'\ttest_when_finished cleanup_git &&\n'> <'\t(\n'> <'\t\tcd "$git" &&\n'> <'\t\tgit init . &&\n'> 
          <'\t\tgit config git-p4.useClientSpec true &&\n'> <'\t\tgit config git-p4.largeFileSystem MockLFS &&\n'> 
          <'\t\tgit config git-p4.largeFileThreshold 24 &&\n'> <'\t\tgit config git-p4.largeFilePush True &&\n'> 
          <'\t\tgit p4 clone --destination="$git" //depot@all &&\n'> <'\n'> <'\t\ttest_file_is_not_in_mock_lfs file1.txt "content 1 txt 23 bytes" &&\n'> 
          <'\t\ttest_file_is_in_mock_lfs file2.dat "content 2-3 bin 25 bytes" &&\n'> <'\t\ttest_file_is_in_mock_lfs "path with spaces/file3.bin" "content 2-3 bin 25 bytes" &&\n'> 
          <'\t\ttest_file_is_deleted_in_mock_lfs file4.bin "content 4 bin 26 bytes XX" &&\n'> <'\n'> <'\t\ttest_file_count_in_dir ".git/mock-storage/local" 2 &&\n'> 
          <'\t\ttest_file_count_in_dir ".git/mock-storage/remote" 2\n'> <'\t)\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'Run git p4 submit in repo configured with large file system'>)} 
      {
        (SQ <'\n'> <'\tclient_view "//depot/... //client/..." &&\n'> 
          <'\ttest_when_finished cleanup_git &&\n'> <'\t(\n'> <'\t\tcd "$git" &&\n'> <'\t\tgit init . &&\n'> 
          <'\t\tgit config git-p4.useClientSpec true &&\n'> <'\t\tgit config git-p4.largeFileSystem MockLFS &&\n'> 
          <'\t\tgit config git-p4.largeFileThreshold 24 &&\n'> <'\t\tgit config git-p4.largeFilePush True &&\n'> 
          <'\t\tgit p4 clone --destination="$git" //depot@all &&\n'> <'\n'> <'\t\ttest_must_fail git p4 submit\n'> <'\t)\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'kill p4d'>)} {(SQ <'\n'> <'\tkill_p4d\n'>)})
    (C {(test_done)})
  ]
)