Robin Rosenberg <robin.rosenberg.lists@dewire.com> writes:This test will always fail as the final exit status is that of "echo", which will exit with success and you are expecting a failure. You are in the directory "t/trash", and try to add t/trashx, so this should fail and you would want to make sure it fails. But this has a few problems: * First, the obvious one. You are creating a garbage file outside of t/trash directory. Don't. If you need to, dig a test directory one level lower inside t/trash and play around there. * In general you should stay away from test_expect_failure. If any of the command in && chain fails, it fails the whole thing, but you cannot tell if the sequence failed at the command you expected to fail or something else that is much earlier. For example, it may be that somebody created t/trashx file in the source tree that is read-only, and the comand that failed in the sequence could be 'touch' before the command you are testing. Instead, write it like (after fixing it not to go outside t/trash): test_expect_success 'add a path outside repo (1)' ' file=path_to_outside_repo && touch "$file" && ! git add "$f" ' I'd like to make the _first_ patch after 1.5.4 to be a fix-up for tests that misuse test_expect_failure. After that, we can use test_expect_failure to mark tests that ought to pass but don't because of bugs in the commands. That way, people who are absolutely bored can grep for test_expect_failure to see what existing issues to tackle ;-). - 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
| Linus Torvalds | Linux 2.6.27-rc8 |
| Jared Hulbert | [PATCH 00/10] AXFS: Advanced XIP filesystem |
| Eric Paris | Re: [malware-list] [RFC 0/5] [TALPA] Intro to a linux interface for on access scan... |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
git: | |
| Jakub Narebski | Re: VCS comparison table |
| Junio C Hamano | Re: [PATCH 0/2] Making "git commit" to mean "git commit -a". |
| Toby White | Using Filemerge.app as a git-diff viewer |
| Ismail | Re: [ANNOUNCE] GIT 1.5.3-rc4 |
| Leon Dippenaar | New tcp stack attack |
| Richard Stallman | Real men don't attack straw men |
| Predrag Punosevac | Skype on the OpenBSD |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Hugh Dickins | Re: [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Jon Smirl | e1000 tcp checksum incorrect, x86 64b |
| David Miller | [GIT]: Networking |
