From 088612b229d8e01c9c2e6deef5af7d4477fe2ef0 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 12 Jul 2010 18:55:19 +0200 Subject: [PATCH] Tests for module '_Exit'. --- ChangeLog | 5 +++++ modules/_Exit-tests | 11 +++++++++++ tests/test-_Exit.c | 27 +++++++++++++++++++++++++++ tests/test-_Exit.sh | 4 ++++ 4 files changed, 47 insertions(+) create mode 100644 modules/_Exit-tests create mode 100644 tests/test-_Exit.c create mode 100755 tests/test-_Exit.sh diff --git a/ChangeLog b/ChangeLog index f644d195b..0034cadcf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2010-07-12 Bruno Haible + 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 index 000000000..7d0388b5e --- /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 diff --git a/tests/test-_Exit.c b/tests/test-_Exit.c new file mode 100644 index 000000000..ad5675590 --- /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 . */ + +/* Written by Bruno Haible , 2010. */ + +#include + +#include + +int +main () +{ + _Exit (81); +} diff --git a/tests/test-_Exit.sh b/tests/test-_Exit.sh new file mode 100755 index 000000000..a706d8bcb --- /dev/null +++ b/tests/test-_Exit.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +./test-_Exit${EXEEXT} +test $? = 81 -- 2.11.0