summaryrefslogtreecommitdiffstats
path: root/t/t0110/url-5
diff options
context:
space:
mode:
authorGhanshyam Thakkar <shyamthakkar001@gmail.com>2024-08-20 17:19:47 +0200
committerJunio C Hamano <gitster@pobox.com>2024-08-20 19:08:28 +0200
commit05026637f3ed0787f15c27da9142896596cc6873 (patch)
tree3d54a81712a1c6d8c2530abbf5583b0bf9a4ace2 /t/t0110/url-5
parentThe third batch (diff)
downloadgit-05026637f3ed0787f15c27da9142896596cc6873.tar.xz
git-05026637f3ed0787f15c27da9142896596cc6873.zip
t: migrate t0110-urlmatch-normalization to the new framework
helper/test-urlmatch-normalization along with t0110-urlmatch-normalization test the `url_normalize()` function from 'urlmatch.h'. Migrate them to the unit testing framework for better performance. And also add different test_msg()s for better debugging. In the migration, last two of the checks from `t_url_general_escape()` were slightly changed compared to the shell script. This involves changing '\'' -> ' '\!' -> ! in the urls of those checks. This is because in C strings, we don't need to escape "'" and "!". Other than these two, all the urls were pasted verbatim from the shell script. Another change is the removal of a MINGW prerequisite from one of the test. It was there because[1] on Windows, the command line is a Unicode string, it is not possible to pass arbitrary bytes to a program. But in unit tests we don't have this limitation. And since we can construct strings with arbitrary bytes in C, let's also remove the test files which contain URLs with arbitrary bytes in the 't/t0110' directory and instead embed those URLs in the unit test code itself. [1]: https://lore.kernel.org/git/53CAC8EF.6020707@gmail.com/ Mentored-by: Christian Couder <chriscool@tuxfamily.org> Mentored-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com> Signed-off-by: Ghanshyam Thakkar <shyamthakkar001@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0110/url-5')
-rw-r--r--t/t0110/url-51
1 files changed, 0 insertions, 1 deletions
diff --git a/t/t0110/url-5 b/t/t0110/url-5
deleted file mode 100644
index 1ccd927779..0000000000
--- a/t/t0110/url-5
+++ /dev/null
@@ -1 +0,0 @@
-x://q/ ¡¢£¤¥¦§¨©ª«¬­®¯