From 27f6c22f36754e6efa42780067a01e551db3ae2b Mon Sep 17 00:00:00 2001 From: neil Date: Fri, 28 Mar 2014 10:51:19 +0000 Subject: [PATCH] Allow test to be terminated by Ctrl-C. git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@48884 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- test/cctest.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/cctest.c b/test/cctest.c index 02ca717d71..7e1b6b1d01 100644 --- a/test/cctest.c +++ b/test/cctest.c @@ -1,3 +1,8 @@ +/* + Copyright © 1995-2014, The AROS Development Team. All rights reserved. + $Id$ +*/ + #include #include @@ -28,8 +33,8 @@ void arrgh(TYPE a, TYPE b, TYPE shouldbe_a, TYPE shouldbe_b) int main(void) { TYPE a, b; - - for(;;) + + while((SetSignal(0, 0) & SIGBREAKF_CTRL_C) == 0) { a = VAL1; b = VAL1; if (!(a == b)) arrgh(a,b,VAL1,VAL1); @@ -40,6 +45,6 @@ int main(void) if (a == b) arrgh(a,b,VAL2,VAL1); if (a <= b) arrgh(a,b,VAL2,VAL1); } - + return 0; } -- 2.11.4.GIT