From 85699d0263e9cd5014ea45e38cb9cd79284fc39b Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Mon, 17 Jun 2013 23:28:07 +0200 Subject: [PATCH] tests/example.c: Use errno = ENOMEM. The output from errno = 0 is less portable. --- tests/example.c | 2 +- tests/example.expected | 2 +- tests/example_environment_empty.expected | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/example.c b/tests/example.c index b1d42e3..fc5c01e 100644 --- a/tests/example.c +++ b/tests/example.c @@ -32,7 +32,7 @@ int main(int argc, char **argv unused) { printf("write to stdout\n"); fflush(stdout); - errno = 0; + errno = ENOMEM; perror("error!"); write(STDERR_FILENO, "write to stderr 2", 17); diff --git a/tests/example.expected b/tests/example.expected index ecd2461..72a30ac 100644 --- a/tests/example.expected +++ b/tests/example.expected @@ -1,6 +1,6 @@ >STDERR>write to stderr: 1 STDERR>error!: Success +>STDERR>error!: Cannot allocate memory STDERR>write to stderr 2STDERR> STDERR>more on stderr diff --git a/tests/example_environment_empty.expected b/tests/example_environment_empty.expected index 2a7f5a1..0feb438 100644 --- a/tests/example_environment_empty.expected +++ b/tests/example_environment_empty.expected @@ -1,6 +1,6 @@ write to stderr: 1 write to stdout -error!: Success +error!: Cannot allocate memory write to stderr 2write to stdout 2 more on stderr -- 2.45.2