Tests for module '_Exit'.
authorBruno Haible <bruno@clisp.org>
Mon, 12 Jul 2010 16:55:19 +0000 (18:55 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 12 Jul 2010 16:57:58 +0000 (18:57 +0200)
ChangeLog
modules/_Exit-tests [new file with mode: 0644]
tests/test-_Exit.c [new file with mode: 0644]
tests/test-_Exit.sh [new file with mode: 0755]

index f644d19..0034cad 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2010-07-12  Bruno Haible  <bruno@clisp.org>
 
+       Tests for module '_Exit'.
+       * modules/_Exit-tests: New file.
+       * tests/test-_Exit.sh: New file.
+       * tests/test-_Exit.c: New file.
+
        New module '_Exit'.
        * lib/stdlib.in.h (__attribute__): New macro.
        (_Exit): New declaration.
diff --git a/modules/_Exit-tests b/modules/_Exit-tests
new file mode 100644 (file)
index 0000000..7d0388b
--- /dev/null
@@ -0,0 +1,11 @@
+Files:
+tests/test-_Exit.sh
+tests/test-_Exit.c
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-_Exit.sh
+check_PROGRAMS += test-_Exit
diff --git a/tests/test-_Exit.c b/tests/test-_Exit.c
new file mode 100644 (file)
index 0000000..ad56755
--- /dev/null
@@ -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 (executable)
index 0000000..a706d8b
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+./test-_Exit${EXEEXT}
+test $? = 81