From 05026637f3ed0787f15c27da9142896596cc6873 Mon Sep 17 00:00:00 2001 From: Ghanshyam Thakkar Date: Tue, 20 Aug 2024 20:49:47 +0530 Subject: 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 Mentored-by: Kaartic Sivaraam Signed-off-by: Ghanshyam Thakkar Signed-off-by: Junio C Hamano --- t/t0110/url-5 | 1 - 1 file changed, 1 deletion(-) delete mode 100644 t/t0110/url-5 (limited to 't/t0110/url-5') 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/ ¡¢£¤¥¦§¨©ª«¬­®¯ -- cgit v1.2.3