From: Johan Herland Date: Tue, 08 Sep 2009 02:27:02 GMT Subject: [PATCHv5 14/14] Add test cases for date-based fanouts Message-ID: <1252376822-6138-15-git-send-email-johan@herland.net> In-Reply-To: <1252376822-6138-1-git-send-email-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 <