about summary refs log tree commit diff
path: root/support/support_quote_blob_wide.c
Commit message (Collapse)AuthorAgeFilesLines
* Add TEST_COMPARE_STRING_WIDE to support/check.hJoseph Myers2021-10-121-0/+24
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.