summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2010-07-12 18:55:19 +0200
committerBruno Haible <bruno@clisp.org>2010-07-12 18:57:58 +0200
commit088612b229d8e01c9c2e6deef5af7d4477fe2ef0 (patch)
tree5a5db14fdcee900b8a195b8f32983693fb0f20cd /tests
parent5518d301980bdc0f60b1b5d58b140004dfda490e (diff)
downloadgnulib-088612b229d8e01c9c2e6deef5af7d4477fe2ef0.tar.gz
Tests for module '_Exit'.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-_Exit.c27
-rwxr-xr-xtests/test-_Exit.sh4
2 files changed, 31 insertions, 0 deletions
diff --git a/tests/test-_Exit.c b/tests/test-_Exit.c
new file mode 100644
index 0000000000..ad5675590a
--- /dev/null
+++ b/tests/test-_Exit.c
@@ -0,0 +1,27 @@
+/* Test of terminating the current process.
+ Copyright (C) 2010 Free Software Foundation, Inc.
+
+ 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 3 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 or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2010. */
+
+#include <config.h>
+
+#include <stdlib.h>
+
+int
+main ()
+{
+ _Exit (81);
+}
diff --git a/tests/test-_Exit.sh b/tests/test-_Exit.sh
new file mode 100755
index 0000000000..a706d8bcbb
--- /dev/null
+++ b/tests/test-_Exit.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+./test-_Exit${EXEEXT}
+test $? = 81