Skip to content

Commit 9a308de

Browse files
peffgitster
authored andcommitted
t5541: move run_with_cmdline_limit to test-lib.sh
We use this to test http pushing with a restricted commandline. Other scripts (like t5551, which does http fetching) will want to use it, too. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 89c57ab commit 9a308de

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

t/t5541-http-push-smart.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -324,12 +324,6 @@ test_expect_success 'push into half-auth-complete requires password' '
324324
test_cmp expect actual
325325
'
326326

327-
run_with_limited_cmdline () {
328-
(ulimit -s 128 && "$@")
329-
}
330-
331-
test_lazy_prereq CMDLINE_LIMIT 'run_with_limited_cmdline true'
332-
333327
test_expect_success CMDLINE_LIMIT 'push 2000 tags over http' '
334328
sha1=$(git rev-parse HEAD) &&
335329
test_seq 2000 |

t/test-lib.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,3 +1062,9 @@ test_lazy_prereq UNZIP '
10621062
"$GIT_UNZIP" -v
10631063
test $? -ne 127
10641064
'
1065+
1066+
run_with_limited_cmdline () {
1067+
(ulimit -s 128 && "$@")
1068+
}
1069+
1070+
test_lazy_prereq CMDLINE_LIMIT 'run_with_limited_cmdline true'

0 commit comments

Comments
 (0)