X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=common-src%2Fquoting-test.c;h=5469677eee9345b73cc08f933587a4aa2ea0d06a;hb=HEAD;hp=1654b0584f670f25547924988c7746ab194674f4;hpb=2627875b7d18858bc1f9f7652811e4d8c15a23eb;p=debian%2Famanda diff --git a/common-src/quoting-test.c b/common-src/quoting-test.c index 1654b05..5469677 100644 --- a/common-src/quoting-test.c +++ b/common-src/quoting-test.c @@ -1,9 +1,10 @@ /* - * Copyright (c) 2008 Zmanda Inc. All Rights Reserved. + * Copyright (c) 2008-2012 Zmanda, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 as published - * by the Free Software Foundation. + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -14,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * Contact information: Zmanda Inc, 465 N Mathlida Ave, Suite 300 + * Contact information: Zmanda Inc, 465 S. Mathilda Ave., Suite 300 * Sunnyvale, CA 94085, USA, or: http://www.zmanda.com * * Author: Dustin J. Mitchell @@ -78,7 +79,7 @@ char * quotable_strings[] = { * Round-trip testing of quoting functions */ -static int +static gboolean test_round_trip(void) { char **strp; @@ -161,7 +162,7 @@ compare_strv( return TRUE; } -static int +static gboolean test_split_quoted_strings(void) { char **iter1, **iter2, **iter3; @@ -215,7 +216,7 @@ struct trial { const char *expected[5]; }; -static int +static gboolean test_split_quoted_strings_edge(void) { gboolean success = TRUE; @@ -250,7 +251,7 @@ test_split_quoted_strings_edge(void) /**** * Test unquoting of some pathological strings */ -static int +static gboolean test_unquote_string(void) { gboolean success = TRUE; @@ -333,7 +334,7 @@ test_unquote_string(void) /**** * Test the strquotedstr function */ -static int +static gboolean test_strquotedstr_skipping(void) { char **iter1, **iter2; @@ -394,7 +395,7 @@ next: return success; } -static int +static gboolean test_strquotedstr_edge_invalid(void) { gboolean success = TRUE; @@ -430,7 +431,7 @@ test_strquotedstr_edge_invalid(void) return success; } -static int +static gboolean test_strquotedstr_edge_valid(void) { gboolean success = TRUE; @@ -478,13 +479,13 @@ int main(int argc, char **argv) { static TestUtilsTest tests[] = { - TU_TEST(test_round_trip, 5), - TU_TEST(test_unquote_string, 5), - TU_TEST(test_split_quoted_strings, 5), - TU_TEST(test_split_quoted_strings_edge, 5), - TU_TEST(test_strquotedstr_skipping, 5), - TU_TEST(test_strquotedstr_edge_invalid, 5), - TU_TEST(test_strquotedstr_edge_valid, 5), + TU_TEST(test_round_trip, 90), + TU_TEST(test_unquote_string, 90), + TU_TEST(test_split_quoted_strings, 90), + TU_TEST(test_split_quoted_strings_edge, 90), + TU_TEST(test_strquotedstr_skipping, 90), + TU_TEST(test_strquotedstr_edge_invalid, 90), + TU_TEST(test_strquotedstr_edge_valid, 90), TU_END() };