author | Jonathan Nieder <jrnieder@gmail.com> | |
Tue, 7 Sep 2010 01:52:27 +0000 (20:52 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 9 Sep 2010 23:01:10 +0000 (16:01 -0700) | ||
commit | 8fe5aeddcbeb194ea0f6e23e1f7b4ac38809921b | |
tree | 2eb74458429acd2eba60e4a86529c66f87ddeec0 | tree | snapshot |
parent | 76bbcd4382797dedb72a50387111a65d88230fa9 | commit | diff |
t1302 (core.repositoryversion): style tweaks
This test is from 2007, which is late enough for the style to be
recognizably modern but still a while ago. Freshen it up to
follow new best practices:
- guard setup commands with test_expect_setup, so errors at
that stage can be caught;
- use <<\EOF in preference to <<EOF, to save reviewers the
trouble of looking for variable interpolations;
- use test_cmp instead of test "$foo" = "$bar", for better
output with -v on failure;
- indent commands in subshells and let them span multiple lines;
- combine the two "gitdir required mode" tests that do not make
as much sense alone.
Cc: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This test is from 2007, which is late enough for the style to be
recognizably modern but still a while ago. Freshen it up to
follow new best practices:
- guard setup commands with test_expect_setup, so errors at
that stage can be caught;
- use <<\EOF in preference to <<EOF, to save reviewers the
trouble of looking for variable interpolations;
- use test_cmp instead of test "$foo" = "$bar", for better
output with -v on failure;
- indent commands in subshells and let them span multiple lines;
- combine the two "gitdir required mode" tests that do not make
as much sense alone.
Cc: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1302-repo-version.sh | diff | blob | history |