]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'sg/test-oid-wo-incomplete-line'
authorJunio C Hamano <gitster@pobox.com>
Thu, 5 Jan 2023 06:07:18 +0000 (15:07 +0900)
committerJunio C Hamano <gitster@pobox.com>
Thu, 5 Jan 2023 06:07:19 +0000 (15:07 +0900)
Test helper updates.

* sg/test-oid-wo-incomplete-line:
  tests: make 'test_oid' print trailing newline

1  2 
t/test-lib-functions.sh

diff --combined t/test-lib-functions.sh
index 0fd7d4a200d0c89808e7d6bc334f059adf96db0d,f51b97663fee664069dc4de1b10753c777ed91c1..f036c4d300393e69f9cb99b895985e27b87595af
@@@ -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.
  #