diff options
author | Colomban Wendling <ban@herbesfolles.org> | 2015-05-26 20:16:27 +0300 |
---|---|---|
committer | Colomban Wendling <ban@herbesfolles.org> | 2015-05-26 20:56:06 +0300 |
commit | 1ecbcd8e51032529435a9e714802f2502293b050 (patch) | |
tree | 2439954e67e7fac7867c062b822e53f350a30173 /tests/filter | |
parent | c11daac9de2fb582873e2471346526f33835226e (diff) |
Fix ident replacement to match Git behavior
Git inserts a space after the SHA1 (as of 2.1.4 at least), so do the
same.
Diffstat (limited to 'tests/filter')
-rw-r--r-- | tests/filter/blob.c | 4 | ||||
-rw-r--r-- | tests/filter/custom.c | 2 | ||||
-rw-r--r-- | tests/filter/ident.c | 12 |
3 files changed, 9 insertions, 9 deletions
diff --git a/tests/filter/blob.c b/tests/filter/blob.c index 48edb8405..bb2528d39 100644 --- a/tests/filter/blob.c +++ b/tests/filter/blob.c @@ -105,11 +105,11 @@ void test_filter_blob__ident(void) cl_git_pass(git_blob_filtered_content(&buf, blob, "filter.identcrlf", 1)); cl_assert_equal_s( - "Some text\r\n$Id: 3164f585d548ac68027d22b104f2d8100b2b6845$\r\nGoes there\r\n", buf.ptr); + "Some text\r\n$Id: 3164f585d548ac68027d22b104f2d8100b2b6845 $\r\nGoes there\r\n", buf.ptr); cl_git_pass(git_blob_filtered_content(&buf, blob, "filter.identlf", 1)); cl_assert_equal_s( - "Some text\n$Id: 3164f585d548ac68027d22b104f2d8100b2b6845$\nGoes there\n", buf.ptr); + "Some text\n$Id: 3164f585d548ac68027d22b104f2d8100b2b6845 $\nGoes there\n", buf.ptr); git_buf_free(&buf); git_blob_free(blob); diff --git a/tests/filter/custom.c b/tests/filter/custom.c index 0fd7c3744..493d26c80 100644 --- a/tests/filter/custom.c +++ b/tests/filter/custom.c @@ -318,7 +318,7 @@ void test_filter_custom__order_dependency(void) /* expansion because reverse was applied at checkin and at ident time, * reverse is not applied yet */ cl_assert_equal_s( - "Another test\n$59001fe193103b1016b27027c0c827d036fd0ac8 :dI$\nCrazy!\n", buf.ptr); + "Another test\n$ 59001fe193103b1016b27027c0c827d036fd0ac8 :dI$\nCrazy!\n", buf.ptr); cl_assert_equal_i(0, git_oid_strcmp( git_blob_id(blob), "8ca0df630d728c0c72072b6101b301391ef10095")); git_blob_free(blob); diff --git a/tests/filter/ident.c b/tests/filter/ident.c index 2c9a3eb68..c54b6214c 100644 --- a/tests/filter/ident.c +++ b/tests/filter/ident.c @@ -49,22 +49,22 @@ void test_filter_ident__to_worktree(void) add_blob_and_filter( "Hello\n$Id$\nFun stuff\n", fl, - "Hello\n$Id: b69e2387aafcaf73c4de5b9ab59abe27fdadee30$\nFun stuff\n"); + "Hello\n$Id: b69e2387aafcaf73c4de5b9ab59abe27fdadee30 $\nFun stuff\n"); add_blob_and_filter( "Hello\n$Id: Junky$\nFun stuff\n", fl, - "Hello\n$Id: 45cd107a7102911cb2a7df08404674327fa050b9$\nFun stuff\n"); + "Hello\n$Id: 45cd107a7102911cb2a7df08404674327fa050b9 $\nFun stuff\n"); add_blob_and_filter( "$Id$\nAt the start\n", fl, - "$Id: b13415c767abc196fb95bd17070e8c1113e32160$\nAt the start\n"); + "$Id: b13415c767abc196fb95bd17070e8c1113e32160 $\nAt the start\n"); add_blob_and_filter( "At the end\n$Id$", fl, - "At the end\n$Id: 1344925c6bc65b34c5a7b50f86bf688e48e9a272$"); + "At the end\n$Id: 1344925c6bc65b34c5a7b50f86bf688e48e9a272 $"); add_blob_and_filter( "$Id$", fl, - "$Id: b3f5ebfb5843bc43ceecff6d4f26bb37c615beb1$"); + "$Id: b3f5ebfb5843bc43ceecff6d4f26bb37c615beb1 $"); add_blob_and_filter( "$Id: Some sort of junk goes here$", fl, - "$Id: ab2dd3853c7c9a4bff55aca2bea077a73c32ac06$"); + "$Id: ab2dd3853c7c9a4bff55aca2bea077a73c32ac06 $"); add_blob_and_filter("$Id: ", fl, "$Id: "); add_blob_and_filter("$Id", fl, "$Id"); |