Otherwise, we can't know which one failed. Signed-off-by: Karl Hasselström <kha@treskal.com> --- t/t1000-branch-create.sh | 71 ++++++++++++++++++++++++++++------------------ 1 files changed, 43 insertions(+), 28 deletions(-) diff --git a/t/t1000-branch-create.sh b/t/t1000-branch-create.sh index 58209e7..cca5504 100755 --- a/t/t1000-branch-create.sh +++ b/t/t1000-branch-create.sh @@ -12,57 +12,72 @@ Exercises the "stg branch" commands. stg init +test_expect_success \ + 'Create a spurious refs/patches/ entry' ' + find .git -name foo | xargs rm -rf && + touch .git/refs/patches/foo +' + test_expect_failure \ - 'Try to create an stgit branch with a spurious refs/patches/ entry' \ - 'find .git -name foo | xargs rm -rf && - touch .git/refs/patches/foo && - stg branch -c foo + 'Try to create an stgit branch with a spurious refs/patches/ entry' ' + stg branch -c foo +' + +test_expect_success \ + 'Check that no part of the branch was created' ' + test "`find .git -name foo | tee /dev/stderr`" = ".git/refs/patches/foo" && + ( grep foo .git/HEAD; test $? = 1 ) ' test_expect_success \ - 'Check no part of the branch was created' \ - 'test "`find .git -name foo | tee /dev/stderr`" = ".git/refs/patches/foo" && - ( grep foo .git/HEAD; test $? = 1 ) + 'Create a spurious patches/ entry' ' + find .git -name foo | xargs rm -rf && + touch .git/patches/foo ' test_expect_failure \ - 'Try to create an stgit branch with a spurious patches/ entry' \ - 'find .git -name foo | xargs rm -rf && - touch .git/patches/foo && - stg branch -c foo + 'Try to create an stgit branch with a spurious patches/ entry' ' + stg branch -c foo ' test_expect_success \ - 'Check no part of the branch was created' \ - 'test "`find .git -name foo | tee /dev/stderr`" = ".git/patches/foo" && - ( grep foo .git/HEAD; test $? = 1 ) + 'Check that no part of the branch was created' ' + test "`find .git -name foo | tee /dev/stderr`" = ".git/patches/foo" && + ( grep foo .git/HEAD; test $? = 1 ) +' + +test_expect_success \ + 'Create a git branch' ' + find .git -name foo | xargs rm -rf && + cp .git/refs/heads/master .git/refs/heads/foo ' test_expect_failure \ - 'Try to create an stgit branch with an existing git branch by that name' \ - 'find .git -name foo | xargs rm -rf && - cp .git/refs/heads/master .git/refs/heads/foo && - stg branch -c foo + 'Try to create an stgit branch with an existing git branch by that name' ' + stg branch -c foo ' test_expect_success \ - 'Check no part of the branch was created' \ - 'test "`find .git -name foo | tee /dev/stderr`" = ".git/refs/heads/foo" && - ( grep foo .git/HEAD; test $? = 1 ) + 'Check that no part of the branch was created' ' + test "`find .git -name foo | tee /dev/stderr`" = ".git/refs/heads/foo" && + ( grep foo .git/HEAD; test $? = 1 ) ' +test_expect_success \ + 'Create an invalid refs/heads/ entry' ' + find .git -name foo | xargs rm -rf && + touch .git/refs/heads/foo +' test_expect_failure \ - 'Try to create an stgit branch with an invalid refs/heads/ entry' \ - 'find .git -name foo | xargs rm -rf && - touch .git/refs/heads/foo && - stg branch -c foo + 'Try to create an stgit branch with an invalid refs/heads/ entry' ' + stg branch -c foo ' test_expect_success \ - 'Check no part of the branch was created' \ - 'test "`find .git -name foo | tee /dev/stderr`" = ".git/refs/heads/foo" && - ( grep foo .git/HEAD; test $? = 1 ) + 'Check that no part of the branch was created' ' + test "`find .git -name foo | tee /dev/stderr`" = ".git/refs/heads/foo" && + ( grep foo .git/HEAD; test $? = 1 ) ' test_done - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| David Miller | Slow DOWN, please!!! |
| Press, Jonathan | RE: [malware-list] [RFC 0/5] [TALPA] Intro to a linuxinterfaceforon access scanning |
| Greg Kroah-Hartman | [patch 01/40] POWERPC: Fix platinumfb framebuffer |
| Chuck Ebbert | Why do so many machines need "noapic"? |
git: | |
| Matthieu Moy | git push to a non-bare repository |
| Junio C Hamano | Re: [PATCH] merge-recursive: Only print relevant rename messages |
| Petr Baudis | Re: [PATCH] Git homepage: remove all the references to Cogito |
| Sergei Organov | Newbie: report of first experience with git-rebase. |
| Andrew Morton | Re: [BUG] New Kernel Bugs |
| Gerrit Renker | [PATCH 0/37] dccp: Feature negotiation - last call for comments |
| David Miller | tbench wrt. loopback TSO |
| Elvis Pranskevichus | Re: sky2: eth0: hung mac 7:69 fifo 0 (165:176) |
| Richard Stallman | Real men don't attack straw men |
| Bertram Scharpf | First install: Grub doesn't find partitions |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Brian Candler | waitpid() thread race |
| VPN's on NetBSD | 4 hours ago | NetBSD |
| Why does uClinux 2.6.18 bootup block SuperIO UART IRQs that BIOS configured | 5 hours ago | Linux kernel |
| USB statistics | 7 hours ago | Linux kernel |
| Block Sub System query | 11 hours ago | Linux kernel |
| kernel module to intercept socket creation | 12 hours ago | Linux kernel |
| Image size changing during each build | 12 hours ago | Linux kernel |
| Soft lock bug | 17 hours ago | Linux kernel |
| sysctl - dynamic registration problem | 1 day ago | Linux kernel |
| Question on swap as ramdisk partition | 1 day ago | Linux kernel |
| serial driver xmit problem | 1 day ago | Linux kernel |
