t5541: move run_with_cmdline_limit to test-lib.sh
authorJeff King <peff@peff.net>
Fri, 13 Mar 2015 04:53:07 +0000 (00:53 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 13 Mar 2015 06:25:45 +0000 (23:25 -0700)
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 <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5541-http-push-smart.sh
t/test-lib.sh
index d2c681ebfde39fcccef190c3a242dfae9d8af2f2..1ecb5881acf720e7c0dc8b885750f6e641764591 100755 (executable)
@@ -324,12 +324,6 @@ test_expect_success 'push into half-auth-complete requires password' '
        test_cmp expect actual
 '
 
-run_with_limited_cmdline () {
-       (ulimit -s 128 && "$@")
-}
-
-test_lazy_prereq CMDLINE_LIMIT 'run_with_limited_cmdline true'
-
 test_expect_success CMDLINE_LIMIT 'push 2000 tags over http' '
        sha1=$(git rev-parse HEAD) &&
        test_seq 2000 |
index 7dd4b4d1c261c6542757bf69c4a04142dee7294d..9914d3e1cfe20f09b47fdc02896dc18ed0f61e45 100644 (file)
@@ -1062,3 +1062,9 @@ test_lazy_prereq UNZIP '
        "$GIT_UNZIP" -v
        test $? -ne 127
 '
+
+run_with_limited_cmdline () {
+       (ulimit -s 128 && "$@")
+}
+
+test_lazy_prereq CMDLINE_LIMIT 'run_with_limited_cmdline true'