Merge branch 'js/mingw-redirect-std-handles'
[alt-git.git] / t / t4062-diff-pickaxe.sh
blob1130c8019b4c14975744f31f360886ffb4c3f14c
1 #!/bin/sh
3 # Copyright (c) 2016 Johannes Schindelin
6 test_description='Pickaxe options'
8 . ./test-lib.sh
10 test_expect_success setup '
11 test_commit initial &&
12 printf "%04096d" 0 >4096-zeroes.txt &&
13 git add 4096-zeroes.txt &&
14 test_tick &&
15 git commit -m "A 4k file"
18 # OpenBSD only supports up to 255 repetitions, so repeat twice for 64*64=4096.
19 test_expect_success '-G matches' '
20 git diff --name-only -G "^(0{64}){64}$" HEAD^ >out &&
21 test 4096-zeroes.txt = "$(cat out)"
24 test_expect_success '-S --pickaxe-regex' '
25 git diff --name-only -S0 --pickaxe-regex HEAD^ >out &&
26 verbose test 4096-zeroes.txt = "$(cat out)"
29 test_done