diff options
| author | Junio C Hamano <gitster@pobox.com> | 2022-09-19 14:35:24 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-09-19 14:35:24 -0700 |
| commit | 9d58241ee4e2c603404e028204221e508bb73644 (patch) | |
| tree | 951433a317c33cfaa2a94d10d2761d82c345e929 /t/chainlint/function.expect | |
| parent | 298a9582249255fe00660a78dba0bb0ef0e1dbe8 (diff) | |
| parent | 7c04aa73906b9186c9d46010227d4437fd534d93 (diff) | |
| download | git-9d58241ee4e2c603404e028204221e508bb73644.tar.xz | |
Merge branch 'es/chainlint'
Revamp chainlint script for our tests.
* es/chainlint:
chainlint: colorize problem annotations and test delimiters
t: retire unused chainlint.sed
t/Makefile: teach `make test` and `make prove` to run chainlint.pl
test-lib: replace chainlint.sed with chainlint.pl
test-lib: retire "lint harder" optimization hack
t/chainlint: add more chainlint.pl self-tests
chainlint.pl: allow `|| echo` to signal failure upstream of a pipe
chainlint.pl: complain about loops lacking explicit failure handling
chainlint.pl: don't flag broken &&-chain if failure indicated explicitly
chainlint.pl: don't flag broken &&-chain if `$?` handled explicitly
chainlint.pl: don't require `&` background command to end with `&&`
t/Makefile: apply chainlint.pl to existing self-tests
chainlint.pl: don't require `return|exit|continue` to end with `&&`
chainlint.pl: validate test scripts in parallel
chainlint.pl: add parser to identify test definitions
chainlint.pl: add parser to validate tests
chainlint.pl: add POSIX shell parser
chainlint.pl: add POSIX shell lexical analyzer
t: add skeleton chainlint.pl
Diffstat (limited to 't/chainlint/function.expect')
| -rw-r--r-- | t/chainlint/function.expect | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/t/chainlint/function.expect b/t/chainlint/function.expect new file mode 100644 index 0000000000..a14388e6b9 --- /dev/null +++ b/t/chainlint/function.expect @@ -0,0 +1,11 @@ +sha1_file ( ) { + echo "$*" | sed "s#..#.git/objects/&/#" +} && + +remove_object ( ) { + file=$(sha1_file "$*") && + test -e "$file" ?!AMP?! + rm -f "$file" +} ?!AMP?! + +sha1_file arg && remove_object arg |
