From 82e32429615722b2c5ccc79a33e52fe4f8ad3aa1 Mon Sep 17 00:00:00 2001 From: Svetlin Stefanov Date: Fri, 26 Aug 2022 22:31:44 +0200 Subject: [PATCH] Add fixtures. --- .../fixtures/generate_git_date_baseline.sh | 39 ++++++++++++++++++ .../generate_git_date_baseline.tar.xz | Bin 0 -> 9160 bytes 2 files changed, 39 insertions(+) create mode 100644 git-date/tests/fixtures/generate_git_date_baseline.sh create mode 100644 git-date/tests/fixtures/generated-archives/generate_git_date_baseline.tar.xz diff --git a/git-date/tests/fixtures/generate_git_date_baseline.sh b/git-date/tests/fixtures/generate_git_date_baseline.sh new file mode 100644 index 00000000000..cf415dc979b --- /dev/null +++ b/git-date/tests/fixtures/generate_git_date_baseline.sh @@ -0,0 +1,39 @@ +#!/bin/bash +set -eu -o pipefail + +git init; + +function baseline() { + local test_date=$1 # first argument is the date to test + + git -c section.key="$test_date" config --type=expiry-date section.key && status=0 || status=$? +# git ls-files "$pathspec" && status=0 || status=$? + { + echo "$test_date" + echo "$status" + } >> baseline.git +} + +# success + +# date formats following to https://git-scm.com/docs/git-log#Documentation/git-log.txt---dateltformatgt +# short +baseline '2022-08-22' +# rfc2822 +baseline 'Thu, 18 Aug 2022 12:45:06 +0800' +# iso8601 +baseline '2022-08-17 22:04:58 +0200' +# iso8601_strict +baseline '2022-08-17T21:43:13+08:00' +# default +baseline 'Thu Sep 04 2022 10:45:06 -0400' +# unix +baseline '123456789' +# raw +baseline '1660874655 +0800' + +# failing + +# empty_input +baseline "" + diff --git a/git-date/tests/fixtures/generated-archives/generate_git_date_baseline.tar.xz b/git-date/tests/fixtures/generated-archives/generate_git_date_baseline.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..dc0ffc1198dabb581474e2df6ce830b811d0d2ed GIT binary patch literal 9160 zcmV;(BRAarH+ooF000E$*0e?f03iVs00030=j;jKxBnxDT>uvgyc~T2mB1Z8f})DV zo{cYQ-SvMkK=)Q#6n3S0F?tQM*-3aSwTv`B)gYWC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