diff options
Diffstat (limited to 'src/tc-strquote.c')
-rw-r--r-- | src/tc-strquote.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/tc-strquote.c b/src/tc-strquote.c index f26ff54..ef357d1 100644 --- a/src/tc-strquote.c +++ b/src/tc-strquote.c @@ -1,10 +1,6 @@ +// SPDX-License-Identifier: MIT /* * Behavior Correctness Test for HX_strquote - * Copyright Jan Engelhardt, 2013 - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the WTF Public License version 2 or - * (at your option) any later version. */ #include <stdbool.h> #include <stdio.h> @@ -26,6 +22,10 @@ static const char input4[] = "http://user:pass@host.de/~path/file(msvc);stuff. static const char output4[] = "http%3A%2F%2Fuser%3Apass%40host.de%2F~path%2Ffile%28msvc%29%3Bstuff.php%3Fquery%5Bphpindex%5D%3Dvalue%26another%3Done%3Bstuff"; static const char input5[] = "echo hello `echo world`"; static const char output5[] = "echo hello ``echo world``"; +static const char input6[] = "\xfb\xef\xff"; +static const char output6[] = "++//"; +static const char input7[] = "\xfb\xef\xff"; +static const char output7[] = "--__"; static int test(const char *input, unsigned int mode, const char *expect) { @@ -65,6 +65,8 @@ int main(void) tst(input3, HXQUOTE_BASE64, output3c); tst(input4, HXQUOTE_URIENC, output4); tst(input5, HXQUOTE_SQLBQUOTE, output5); + tst(input6, HXQUOTE_BASE64, output6); + tst(input7, HXQUOTE_BASE64URL, output7); return 0; #undef tst } |