summaryrefslogtreecommitdiff
path: root/git-sh-i18n.sh
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2012-10-23 14:59:26 -0400
committerLibravatar Jeff King <peff@peff.net>2012-10-24 03:36:49 -0400
commited838e661551958076beda19c9445101da2b70ae (patch)
tree8fc6fe57f875ce9fd8a0888ba2cb3a3cde4c8043 /git-sh-i18n.sh
parentGit 1.8.0 (diff)
downloadtgif-ed838e661551958076beda19c9445101da2b70ae.tar.xz
t1300: style updates
The t1300 test script is quite old, and does not use our modern techniques or styles. This patch updates it in the following ways: 1. Use test_cmp instead of cmp (to make failures easier to debug). 2. Use test_cmp instead of 'test $(command) = expected'. This makes failures much easier to debug, and also makes sure that $(command) exits appropriately. 3. Use test_must_fail (easier to read, and checks more rigorously for signal death). 4. Write tests with the usual style of: test_expect_success 'test name' ' test commands && ... ' rather than one-liners, or using backslash-continuation. This is purely a style fixup. There are still a few command happening outside of test_expect invocations, but they are all innoccuous system commands like "cat" and "cp". In an ideal world, each test would be self sufficient and all commands would happen inside test_expect, but it is not immediately obvious how the grouping should work (some of the commands impact the subsequent tests, and some of them are setting up and modifying state that many tests depend on). This patch just picks the low-hanging style fruit, and we can do more fixes on top later. Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 'git-sh-i18n.sh')
0 files changed, 0 insertions, 0 deletions