summaryrefslogtreecommitdiff
path: root/t/chainlint/loop-detect-status.test
diff options
context:
space:
mode:
authorJiang Xin <worldhello.net@gmail.com>2022-09-21 08:13:27 +0800
committerJiang Xin <worldhello.net@gmail.com>2022-09-21 08:13:27 +0800
commit2e2f4dd1e6ac94e7a0dbf212a74a3f1246a99d8e (patch)
treedb706cc504dbf82a30ae2268e44b3208ce902a61 /t/chainlint/loop-detect-status.test
parenta275db6deca03169de04c9d4afd41bd3ba662ce3 (diff)
parentdda7228a83e2e9ff584bf6adbf55910565b41e14 (diff)
Merge branch 'main' of github.com:git/git
* 'main' of github.com:git/git: (45 commits) A bit more of remaining topics before -rc1 t1800: correct test to handle Cygwin chainlint: colorize problem annotations and test delimiters ls-files: fix black space in error message list-objects-filter: convert filter_spec to a strbuf list-objects-filter: add and use initializers list-objects-filter: handle null default filter spec list-objects-filter: don't memset after releasing filter struct builtin/mv.c: fix possible segfault in add_slash() Documentation/technical: include Scalar technical doc t/perf: add 'GIT_PERF_USE_SCALAR' run option t/perf: add Scalar performance tests scalar-clone: add test coverage scalar: add to 'git help -a' command list scalar: implement the `help` subcommand git help: special-case `scalar` scalar: include in standard Git build & installation scalar: fix command documentation section header t: retire unused chainlint.sed t/Makefile: teach `make test` and `make prove` to run chainlint.pl ...
Diffstat (limited to 't/chainlint/loop-detect-status.test')
-rw-r--r--t/chainlint/loop-detect-status.test19
1 files changed, 19 insertions, 0 deletions
diff --git a/t/chainlint/loop-detect-status.test b/t/chainlint/loop-detect-status.test
new file mode 100644
index 0000000000..1c6c23cfc9
--- /dev/null
+++ b/t/chainlint/loop-detect-status.test
@@ -0,0 +1,19 @@
+# LINT: "$?" handled explicitly within loop body
+(while test $i -le $blobcount
+ do
+ printf "Generating blob $i/$blobcount\r" >&2 &&
+ printf "blob\nmark :$i\ndata $blobsize\n" &&
+ #test-tool genrandom $i $blobsize &&
+ printf "%-${blobsize}s" $i &&
+ echo "M 100644 :$i $i" >> commit &&
+ i=$(($i+1)) ||
+ echo $? > exit-status
+ done &&
+ echo "commit refs/heads/main" &&
+ echo "author A U Thor <author@email.com> 123456789 +0000" &&
+ echo "committer C O Mitter <committer@email.com> 123456789 +0000" &&
+ echo "data 5" &&
+ echo ">2gb" &&
+ cat commit) |
+git fast-import --big-file-threshold=2 &&
+test ! -f exit-status