changeset 13458:188d51de4042

Tests for module '_Exit'.
author Bruno Haible <bruno@clisp.org>
date Mon, 12 Jul 2010 18:55:19 +0200
parents fd542c59e379
children 0a02e7a4ac23
files ChangeLog modules/_Exit-tests tests/test-_Exit.c tests/test-_Exit.sh
diffstat 4 files changed, 47 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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.
new file mode 100644
--- /dev/null
+++ b/modules/_Exit-tests
@@ -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
new file mode 100644
--- /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);
+}
new file mode 100755
--- /dev/null
+++ b/tests/test-_Exit.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+./test-_Exit${EXEEXT}
+test $? = 81