summaryrefslogtreecommitdiff
path: root/t/t7501-commit.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t7501-commit.sh')
-rwxr-xr-xt/t7501-commit.sh17
1 files changed, 15 insertions, 2 deletions
diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh
index d58b097..63e0427 100755
--- a/t/t7501-commit.sh
+++ b/t/t7501-commit.sh
@@ -346,8 +346,21 @@ test_expect_success 'amend commit to fix date' '
'
-test_expect_success 'commit complains about bogus date' '
- test_must_fail git commit --amend --date=10.11.2010
+test_expect_success 'commit mentions forced date in output' '
+ git commit --amend --date=2010-01-02T03:04:05 >output &&
+ grep "Date: *Sat Jan 2 03:04:05 2010" output
+'
+
+test_expect_success 'commit complains about completely bogus dates' '
+ test_must_fail git commit --amend --date=seventeen
+'
+
+test_expect_success 'commit --date allows approxidate' '
+ git commit --amend \
+ --date="midnight the 12th of october, anno domini 1979" &&
+ echo "Fri Oct 12 00:00:00 1979 +0000" >expect &&
+ git log -1 --format=%ad >actual &&
+ test_cmp expect actual
'
test_expect_success 'sign off (1)' '