svn commit: r1920853 - in /apr/apr/trunk/test: echoargs.c testproc.c

[email protected]
Newsgroups gmane.comp.apache.apr.cvs
Message-ID <[email protected]>
Author: ivan
Date: Mon Sep 23 09:25:35 2024
New Revision: 1920853

URL: http://svn.apache.org/viewvc?rev=1920853&view=rev
Log:
test_proc_args: Print arguments separated with newlines.

Modified:
    apr/apr/trunk/test/echoargs.c
    apr/apr/trunk/test/testproc.c

Modified: apr/apr/trunk/test/echoargs.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/echoargs.c?rev=1920853&r1=1920852&r2=1920853&view=diff
==============================================================================
--- apr/apr/trunk/test/echoargs.c (original)
+++ apr/apr/trunk/test/echoargs.c Mon Sep 23 09:25:35 2024
@@ -37,8 +37,7 @@ int main(int argc, const char * const *a
     apr_file_open_stdout(&file, pool);
     for (i = 1; i < argc; i++)
     {
-        if (i > 1) apr_file_puts(",", file);
-        apr_file_puts(argv[i], file);
+        apr_file_printf(file, "%d: [%s]\n", i, argv[i]);
     }
 
     apr_terminate();

Modified: apr/apr/trunk/test/testproc.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testproc.c?rev=1920853&r1=1920852&r2=1920853&view=diff
==============================================================================
--- apr/apr/trunk/test/testproc.c (original)
+++ apr/apr/trunk/test/testproc.c Mon Sep 23 09:25:35 2024
@@ -217,14 +217,16 @@ static void test_proc_args(abts_case* tc
         actual = apr_pstrcat(p, actual, buf, NULL);
     }
 
-    expected = "1" ","
-               "" ","
-               "\"te st" ","
-               " a\\b" ","
-               " a\\\\b" ","
-               " \\" ","
-               "new\nline" ","
-               " \\\\";
+    expected =
+        "1: [1]" "\n"
+        "2: []" "\n"
+        "3: [\"te st]" "\n"
+        "4: [ a\\b]" "\n"
+        "5: [ a\\\\b]" "\n"
+        "6: [ \\]" "\n"
+        "7: [new\nline]" "\n"
+        "8: [ \\\\]" "\n";
+
     ABTS_STR_EQUAL(tc, expected, actual);
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.