diff options
author | Ivan Zhakov <ivan@apache.org> | 2024-09-23 09:25:35 +0000 |
---|---|---|
committer | Ivan Zhakov <ivan@apache.org> | 2024-09-23 09:25:35 +0000 |
commit | 27b0370222bbeea6443ace8557a4d8779cc9cdbd (patch) | |
tree | b0c004eac3bcfe25bd1a1a21c4e29233623ee335 | |
parent | d8c5b53185058cbd08a2fce4d15de6a9b29d39bb (diff) | |
download | apr-27b0370222bbeea6443ace8557a4d8779cc9cdbd.tar.gz apr-27b0370222bbeea6443ace8557a4d8779cc9cdbd.zip |
test_proc_args: Print arguments separated with newlines.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1920853 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | test/echoargs.c | 3 | ||||
-rw-r--r-- | test/testproc.c | 18 |
2 files changed, 11 insertions, 10 deletions
diff --git a/test/echoargs.c b/test/echoargs.c index 38ce5fa0f..f61df450a 100644 --- a/test/echoargs.c +++ b/test/echoargs.c @@ -37,8 +37,7 @@ int main(int argc, const char * const *argv, const char* const* env) 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(); diff --git a/test/testproc.c b/test/testproc.c index 50ea8e751..80f719546 100644 --- a/test/testproc.c +++ b/test/testproc.c @@ -217,14 +217,16 @@ static void test_proc_args(abts_case* tc, void* data) 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); } |