diff options
| author | Justus Winter <[email protected]> | 2016-10-07 14:13:08 +0000 |
|---|---|---|
| committer | Justus Winter <[email protected]> | 2016-10-07 14:25:55 +0000 |
| commit | 11eac7eb2fa3392a9aa052f8f5bb9875129ab84b (patch) | |
| tree | 763ec246a13d074adbd39c3a32be71fb158ccc34 /tests/gpgscm/t-child.c | |
| parent | gpgscm: Improve path handling. (diff) | |
| download | gnupg-11eac7eb2fa3392a9aa052f8f5bb9875129ab84b.tar.gz gnupg-11eac7eb2fa3392a9aa052f8f5bb9875129ab84b.zip | |
gpgscm: Improve test of low-level functions.
* tests/gpgscm/t-child.c: Print large amounts of data.
* tests/gpgscm/t-child.scm: Test that this works.
Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to 'tests/gpgscm/t-child.c')
| -rw-r--r-- | tests/gpgscm/t-child.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/gpgscm/t-child.c b/tests/gpgscm/t-child.c index fe2e7b407..ae1a6352c 100644 --- a/tests/gpgscm/t-child.c +++ b/tests/gpgscm/t-child.c @@ -30,6 +30,8 @@ int main (int argc, char **argv) { + char buffer[4096]; + memset (buffer, 'A', sizeof buffer); #if _WIN32 if (! setmode (stdin, O_BINARY)) return 23; @@ -49,10 +51,16 @@ main (int argc, char **argv) fprintf (stdout, "hello"); else if (strcmp (argv[1], "hello_stderr") == 0) fprintf (stderr, "hello"); + else if (strcmp (argv[1], "stdout4096") == 0) + fwrite (buffer, 1, sizeof buffer, stdout); + else if (strcmp (argv[1], "stdout8192") == 0) + { + fwrite (buffer, 1, sizeof buffer, stdout); + fwrite (buffer, 1, sizeof buffer, stdout); + } else if (strcmp (argv[1], "cat") == 0) while (! feof (stdin)) { - char buffer[4096]; size_t bytes_read; bytes_read = fread (buffer, 1, sizeof buffer, stdin); fwrite (buffer, 1, bytes_read, stdout); |
