From: Johan Herland Date: Sat, 12 Sep 2009 16:08:48 GMT Subject: [PATCHv6 14/14] Add test cases for various date-based fanouts Message-ID: <1252771728-27206-15-git-send-email-johan@herland.net> In-Reply-To: <200909121752.07523.johan@herland.net> Signed-off-by: Johan Herland --- t/t3303-notes-subtrees.sh | 64 +++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 64 insertions(+), 0 deletions(-) diff --git a/t/t3303-notes-subtrees.sh b/t/t3303-notes-subtrees.sh index d24203e..d3cbf6d 100755 --- a/t/t3303-notes-subtrees.sh +++ b/t/t3303-notes-subtrees.sh @@ -134,4 +134,68 @@ test_expect_success 'verify notes in 4/36-fanout overriding 2/38-fanout' 'verify test_expect_success 'test notes in 2/38-fanout overriding 2/2/36-fanout' 'test_preferred "s|^..|&/|" "s|^\(..\)\(..\)|\1/\2/|"' test_expect_success 'verify notes in 2/38-fanout overriding 2/2/36-fanout' 'verify_notes' +test_date_based () { + ( + start_note_commit && + nr=$number_of_commits && + git log --format="%H %ct" refs/heads/master | + while read sha1 date_t; do + date=$(date -u -d "@$date_t" +"$1") + note_path="$date/$(echo "$sha1" | sed "$2")" + cat <