regex: -G<pattern> feeds a non NUL-terminated string to regexec() and fails
[git.git] / t / t4062-diff-pickaxe.sh
blob5929f2eabb966305a4b0bb6ec6b1d4d9a4e9efe2
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"
17 test_expect_failure '-G matches' '
18 git diff --name-only -G "^0{4096}$" HEAD^ >out &&
19 test 4096-zeroes.txt = "$(cat out)"
22 test_done