diff options
author | Jörg Frings-Fürst <debian@jff-webhsoting.net> | 2018-07-09 12:18:10 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhsoting.net> | 2018-07-09 12:18:10 +0200 |
commit | f10130df30ed342e6064aa60d2a56f5107385d6b (patch) | |
tree | 202b9eac5bfd92ebfcb3b6402d68141032054eb0 /test | |
parent | 12af0f6afae11029a608e33b98047aea4e82da7d (diff) | |
parent | 86fee0b29894235a4a9a5e64afe0a643841f500f (diff) |
Merge branch 'release/debian/0.8.5-2'debian/0.8.5-2
Diffstat (limited to 'test')
-rw-r--r-- | test/FourSuite.cpp | 2 | ||||
-rw-r--r-- | test/FourSuite.h | 2 | ||||
-rw-r--r-- | test/VersionSuite.cpp | 2 | ||||
-rw-r--r-- | test/VersionSuite.h | 2 | ||||
-rw-r--r-- | test/test.cpp | 23 |
5 files changed, 26 insertions, 5 deletions
diff --git a/test/FourSuite.cpp b/test/FourSuite.cpp index 706ee56..5ecdcb4 100644 --- a/test/FourSuite.cpp +++ b/test/FourSuite.cpp @@ -2,7 +2,7 @@ * uriparser - RFC 3986 URI parsing library * * Copyright (C) 2007, Weijia Song <songweijia@gmail.com> - * Copyright (C) 2007, Sebastian Pipping <webmaster@hartwork.org> + * Copyright (C) 2007, Sebastian Pipping <sebastian@pipping.org> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/test/FourSuite.h b/test/FourSuite.h index 24144cc..9a33c16 100644 --- a/test/FourSuite.h +++ b/test/FourSuite.h @@ -2,7 +2,7 @@ * uriparser - RFC 3986 URI parsing library * * Copyright (C) 2007, Weijia Song <songweijia@gmail.com> - * Copyright (C) 2007, Sebastian Pipping <webmaster@hartwork.org> + * Copyright (C) 2007, Sebastian Pipping <sebastian@pipping.org> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/test/VersionSuite.cpp b/test/VersionSuite.cpp index 82deddc..1c2d072 100644 --- a/test/VersionSuite.cpp +++ b/test/VersionSuite.cpp @@ -1,7 +1,7 @@ /* * uriparser - RFC 3986 URI parsing library * - * Copyright (C) 2014, Sebastian Pipping <webmaster@hartwork.org> + * Copyright (C) 2014, Sebastian Pipping <sebastian@pipping.org> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/test/VersionSuite.h b/test/VersionSuite.h index 495d3fc..f0276c5 100644 --- a/test/VersionSuite.h +++ b/test/VersionSuite.h @@ -1,7 +1,7 @@ /* * uriparser - RFC 3986 URI parsing library * - * Copyright (C) 2014, Sebastian Pipping <webmaster@hartwork.org> + * Copyright (C) 2014, Sebastian Pipping <sebastian@pipping.org> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/test/test.cpp b/test/test.cpp index d6f14cb..0b1290c 100644 --- a/test/test.cpp +++ b/test/test.cpp @@ -2,7 +2,7 @@ * uriparser - RFC 3986 URI parsing library * * Copyright (C) 2007, Weijia Song <songweijia@gmail.com> - * Copyright (C) 2007, Sebastian Pipping <webmaster@hartwork.org> + * Copyright (C) 2007, Sebastian Pipping <sebastian@pipping.org> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -98,6 +98,7 @@ public: TEST_ADD(UriSuite::testCrash_FreeUriMembers_Bug20080116) TEST_ADD(UriSuite::testCrash_Report2418192) TEST_ADD(UriSuite::testPervertedQueryString); + TEST_ADD(UriSuite::testQueryStringEndingInEqualSign_NonBug32); TEST_ADD(UriSuite::testCrash_MakeOwner_Bug20080207) TEST_ADD(UriSuite::testQueryList) TEST_ADD(UriSuite::testQueryListPair) @@ -1576,6 +1577,26 @@ Rule | Example | hostSet | absPath | emptySeg helperTestQueryString("http://example.org/?&&=&&&=&&&&==&===&====", 5); } + void testQueryStringEndingInEqualSign_NonBug32() { + const char * queryString = "firstname=sdsd&lastname="; + + UriQueryListA * queryList = NULL; + int itemCount = 0; + const int res = uriDissectQueryMallocA(&queryList, &itemCount, + queryString, queryString + strlen(queryString)); + + TEST_ASSERT(res == URI_SUCCESS); + TEST_ASSERT(itemCount == 2); + TEST_ASSERT(queryList != NULL); + TEST_ASSERT(strcmp(queryList->key, "firstname") == 0); + TEST_ASSERT(strcmp(queryList->value, "sdsd") == 0); + TEST_ASSERT(strcmp(queryList->next->key, "lastname") == 0); + TEST_ASSERT(strcmp(queryList->next->value, "") == 0); + TEST_ASSERT(queryList->next->next == NULL); + + uriFreeQueryListA(queryList); + } + void helperTestQueryString(char const * uriString, int pairsExpected) { UriParserStateA state; UriUriA uri; |