Thread (77 messages) 77 messages, 3 authors, 2021-04-12
STALE1926d
Revisions (2)
  1. v1 current
  2. v1 [diff vs current]

[PATCH 17/25] pickaxe tests: add test for "log -S" not being a regex

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2021-02-03 03:31:08
Subsystem: the rest · Maintainer: Linus Torvalds

No test in our test suite checked for "log -S<pat>" being a fixed
string, as opposed to "log -S<pat> --pickaxe-regex". Let's test for
it.

Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
---
 t/t4209-log-pickaxe.sh | 11 +++++++++++
 1 file changed, 11 insertions(+)
diff --git a/t/t4209-log-pickaxe.sh b/t/t4209-log-pickaxe.sh
index ebd51f498b..b59aaecc68 100755
--- a/t/t4209-log-pickaxe.sh
+++ b/t/t4209-log-pickaxe.sh
@@ -121,6 +121,17 @@ test_expect_success 'log -G trims diff new/old [-+]' '
 	test_cmp log full-log
 '
 
+test_expect_success 'log -S<pat> is not a regex, but -S<pat> --pickaxe-regex is' '
+	git -C GS-plain log -S"a" >log &&
+	test_cmp log full-log &&
+
+	git -C GS-plain log -S"[a]" >log &&
+	test_must_be_empty log &&
+
+	git -C GS-plain log -S"[a]" --pickaxe-regex >log &&
+	test_cmp log full-log
+'
+
 test_expect_success 'setup log -[GS] binary & --text' '
 	test_create_repo GS-bin-txt &&
 	test_commit -C GS-bin-txt --append A data.bin "a\na\0a\n" &&
-- 
2.30.0.284.gd98b1dd5eaa7
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help