]>
Commit | Line | Data |
---|---|---|
db5dfa33 JS |
1 | #!/bin/sh |
2 | # | |
3 | # Copyright (c) 2016 Johannes Schindelin | |
4 | # | |
5 | ||
6 | test_description='Pickaxe options' | |
7 | ||
16d4bd4f | 8 | TEST_PASSES_SANITIZE_LEAK=true |
db5dfa33 JS |
9 | . ./test-lib.sh |
10 | ||
11 | test_expect_success setup ' | |
12 | test_commit initial && | |
13 | printf "%04096d" 0 >4096-zeroes.txt && | |
14 | git add 4096-zeroes.txt && | |
15 | test_tick && | |
16 | git commit -m "A 4k file" | |
17 | ' | |
4c7fda8f RS |
18 | |
19 | # OpenBSD only supports up to 255 repetitions, so repeat twice for 64*64=4096. | |
b7d36ffc | 20 | test_expect_success '-G matches' ' |
4c7fda8f | 21 | git diff --name-only -G "^(0{64}){64}$" HEAD^ >out && |
db5dfa33 JS |
22 | test 4096-zeroes.txt = "$(cat out)" |
23 | ' | |
24 | ||
f53c5de2 SG |
25 | test_expect_success '-S --pickaxe-regex' ' |
26 | git diff --name-only -S0 --pickaxe-regex HEAD^ >out && | |
27 | verbose test 4096-zeroes.txt = "$(cat out)" | |
28 | ' | |
29 | ||
db5dfa33 | 30 | test_done |