0001-Output-count-of-checked-codepoints.patch

text/plain

Filename: 0001-Output-count-of-checked-codepoints.patch
Type: text/plain
Part: 0
Message: Re: Built-in CTYPE provider

Patch

Format: format-patch
Series: patch 0001
Subject: Output count of checked codepoints.
File+
src/common/unicode/category_test.c 7 1
From 5ff09eb7371abc14cd8537b4e3265e35f030794f Mon Sep 17 00:00:00 2001
From: Jeremy Schneider <schneider@ardentperf.com>
Date: Wed, 10 Jan 2024 07:25:17 +0000
Subject: [PATCH] Output count of checked codepoints.

---
 src/common/unicode/category_test.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/common/unicode/category_test.c b/src/common/unicode/category_test.c
index 6cd7cd1a5f..62ff345066 100644
--- a/src/common/unicode/category_test.c
+++ b/src/common/unicode/category_test.c
@@ -53,6 +53,7 @@ main(int argc, char **argv)
 	int			icu_unicode_version = parse_unicode_version(U_UNICODE_VERSION);
 	int			pg_skipped_codepoints = 0;
 	int			icu_skipped_codepoints = 0;
+	int			checked_codepoints = 0;
 
 	printf("Postgres Unicode Version:\t%s\n", PG_UNICODE_VERSION);
 	printf("ICU Unicode Version:\t\t%s\n", U_UNICODE_VERSION);
@@ -90,6 +91,10 @@ main(int argc, char **argv)
 				exit(1);
 			}
 		}
+		else
+		{
+			checked_codepoints++;
+		}
 	}
 
 	if (pg_skipped_codepoints > 0)
@@ -99,7 +104,8 @@ main(int argc, char **argv)
 		printf("Skipped %d codepoints unassigned in ICU due to Unicode version mismatch.\n",
 			   icu_skipped_codepoints);
 
-	printf("category_test: All tests successful!\n");
+	printf("category_test: All %d tests successful!\n",
+		   checked_codepoints);
 	exit(0);
 #else
 	printf("ICU support required for test; skipping.\n");
-- 
2.34.1