From: Junio C Hamano Date: Thu, 5 Jan 2023 06:07:18 +0000 (+0900) Subject: Merge branch 'sg/test-oid-wo-incomplete-line' X-Git-Tag: v2.40.0-rc0~109 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6f212b7c3f01fbdcef07e8076e877c5a8e2d33f2;hp=-c;p=thirdparty%2Fgit.git Merge branch 'sg/test-oid-wo-incomplete-line' Test helper updates. * sg/test-oid-wo-incomplete-line: tests: make 'test_oid' print trailing newline --- 6f212b7c3f01fbdcef07e8076e877c5a8e2d33f2 diff --combined t/test-lib-functions.sh index 0fd7d4a200,f51b97663f..f036c4d300 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@@ -1682,7 -1682,7 +1682,7 @@@ test_oid () then BUG "undefined key '$1'" fi && - eval "printf '%s' \"\${$var}\"" + eval "printf '%s\n' \"\${$var}\"" } # Insert a slash into an object ID so it can be used to reference a location @@@ -1751,13 -1751,6 +1751,13 @@@ test_path_is_hidden () return 1 } +# Poor man's URI escaping. Good enough for the test suite whose trash +# directory has a space in it. See 93c3fcbe4d4 (git-svn: attempt to +# mimic SVN 1.7 URL canonicalization, 2012-07-28) for prior art. +test_uri_escape() { + sed 's/ /%20/g' +} + # Check that the given command was invoked as part of the # trace2-format trace on stdin. #