threads / patch / 15361

patch, 2 partsAdded test for log`s new '%d' format specifier

Subject: [PATCH 2/2] Added test for log`s new '%d' format specifier

## tl;dr

One message between Sep 3, 2008 and Sep 3, 2008. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Michael Dressel· Sep 3, 2008, 18:42 UTC · lore
Signed-off-by: Michael Dressel <MichaelTiloDressel@t-online.de>
---
  t/t4203-log.sh |   41 +++++++++++++++++++++++++++++++++++++++++
  1 files changed, 41 insertions(+), 0 deletions(-)
  create mode 100755 t/t4203-log.sh
Show changes to t/t4203-log.sh +41 −0
diff --git a/t/t4203-log.sh b/t/t4203-log.sh
new file mode 100755
index 0000000..ef13927
--- /dev/null
+++ b/t/t4203-log.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+test_description='git log --pretty=format:%h%d'
+
+. ./test-lib.sh
+
+test_expect_success setup '
+
+	echo one >one &&
+	git add one &&
+	test_tick &&
+	git commit -m initial &&
+	git tag -a V1 -m "v1" &&
+
+	echo ichi >one &&
+	git add one &&
+	test_tick &&
+	git commit -m second &&
+	git tag l2 &&
+
+	echo bichi >one &&
+	git add one &&
+	test_tick &&
+	git commit -m third &&
+	git tag l3 &&
+	git tag -a V3 -m "v3"
+
+'
+
+test_expect_success 'find decoration' '
+
+	git log --pretty="format:%h %d" | grep V1 &&
+	git log --pretty="format:%h %d" | grep V3 &&
+	git log --pretty="format:%h %d" | grep l2 &&
+	git log --pretty="format:%h %d" | grep l3
+
+
+'
+
+test_done
+
-- 
1.6.0.1

← back to recent threads