(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <"git svn gc basic tests">)} spids: [10] ) ] spids: [10] ) (C {(.)} {(./lib-git-svn.sh)}) (C {(test_expect_success)} {(SQ <"setup directories and test repo">)} { (SQ <"\n"> <"\tmkdir import &&\n"> <"\tmkdir tmp &&\n"> <"\techo \"Sample text for Subversion repository.\" > import/test.txt &&\n"> <"\tsvn_cmd import -m \"import for git svn\" import \"$svnrepo\" > /dev/null\n"> <"\t"> ) } ) (C {(test_expect_success)} {(SQ <"checkout working copy from svn">)} {(SQ <"svn_cmd co \"$svnrepo\" test_wc">)} ) (C {(test_expect_success)} {(SQ <"set some properties to create an unhandled.log file">)} { (SQ <"\n"> <"\t(\n"> <"\t\tcd test_wc &&\n"> <"\t\tsvn_cmd propset foo bar test.txt &&\n"> <"\t\tsvn_cmd commit -m \"property set\"\n"> <"\t)"> ) } ) (C {(test_expect_success)} {(SQ <"Setup repo">)} {(SQ <"git svn init \"$svnrepo\"">)}) (C {(test_expect_success)} {(SQ <"Fetch repo">)} {(SQ <"git svn fetch">)}) (C {(test_expect_success)} {(SQ <"make backup copy of unhandled.log">)} {(SQ <"\n"> <"\t cp .git/svn/refs/remotes/git-svn/unhandled.log tmp\n"> <"\t">)} ) (C {(test_expect_success)} {(SQ <"create leftover index">)} {(SQ <"> .git/svn/refs/remotes/git-svn/index">)} ) (C {(test_expect_success)} {(SQ <"git svn gc runs">)} {(SQ <"git svn gc">)}) (C {(test_expect_success)} {(SQ <"git svn index removed">)} {(SQ <"! test -f .git/svn/refs/remotes/git-svn/index">)} ) (If arms: [ (if_arm cond: [(C {(test)} {(-r)} {(.git/svn/refs/remotes/git-svn/unhandled.log.gz)})] action: [ (C {(test_expect_success)} {(SQ <"git svn gc produces a valid gzip file">)} {(SQ <"\n"> <"\t\t gunzip .git/svn/refs/remotes/git-svn/unhandled.log.gz\n"> <"\t\t">)} ) ] spids: [-1 142] ) ] spids: [-1 157] ) (C {(test_expect_success)} {(SQ <"git svn gc does not change unhandled.log files">)} { (SQ <"\n"> <"\t test_cmp .git/svn/refs/remotes/git-svn/unhandled.log tmp/unhandled.log\n"> <"\t"> ) } ) (C {(test_done)}) ] )