aboutsummaryrefslogtreecommitdiff
path: root/support/Makefile
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2021-10-12 13:48:39 +0000
committerJoseph Myers <joseph@codesourcery.com>2021-10-12 13:48:39 +0000
commitde82cb0da4b8fa5b3d56c457438d2568c67ab1b1 (patch)
tree396836ad8aa0a466b0cc8a379c6933b972780ce9 /support/Makefile
parent4912c738fcbc6def723370ec3a7ab4a732361322 (diff)
downloadglibc-de82cb0da4b8fa5b3d56c457438d2568c67ab1b1.zip
glibc-de82cb0da4b8fa5b3d56c457438d2568c67ab1b1.tar.gz
glibc-de82cb0da4b8fa5b3d56c457438d2568c67ab1b1.tar.bz2
Add TEST_COMPARE_STRING_WIDE to support/check.h
I'd like to be able to test narrow and wide string interfaces, with the narrow string tests using TEST_COMPARE_STRING and the wide string tests using something analogous (possibly generated using macros from a common test template for both the narrow and wide string tests where appropriate). Add such a TEST_COMPARE_STRING_WIDE, along with functions support_quote_blob_wide and support_test_compare_string_wide that it builds on. Those functions are built using macros from common templates shared by the narrow and wide string implementations, though I didn't do that for the tests of test functions. In support_quote_blob_wide, I chose to use the \x{} delimited escape sequence syntax proposed for C2X in N2785, rather than e.g. trying to generate the end of a string and the start of a new string when ambiguity would result from undelimited \x (when the next character after such an escape sequence is valid hex) or forcing an escape sequence to be used for the next character in the case of such ambiguity. Tested for x86_64.
Diffstat (limited to 'support/Makefile')
-rw-r--r--support/Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/support/Makefile b/support/Makefile
index fd27c84..7f03950 100644
--- a/support/Makefile
+++ b/support/Makefile
@@ -71,6 +71,7 @@ libsupport-routines = \
support_openpty \
support_paths \
support_quote_blob \
+ support_quote_blob_wide \
support_quote_string \
support_record_failure \
support_run_diff \
@@ -84,6 +85,7 @@ libsupport-routines = \
support_test_compare_blob \
support_test_compare_failure \
support_test_compare_string \
+ support_test_compare_string_wide \
support_test_main \
support_test_verify_impl \
support_wait_for_thread_exit \
@@ -270,11 +272,13 @@ tests = \
tst-support-open-dev-null-range \
tst-support-process_state \
tst-support_quote_blob \
+ tst-support_quote_blob_wide \
tst-support_quote_string \
tst-support_record_failure \
tst-test_compare \
tst-test_compare_blob \
tst-test_compare_string \
+ tst-test_compare_string_wide \
tst-timespec \
tst-xreadlink \
tst-xsigstack \