Copyright clean-up (part 1):
[AROS.git] / test / dos / systemtags.c
blob94c64ef34891d312761906f3ec7acce4ad519cbc
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <proto/dos.h>
7 #include <proto/alib.h>
9 #include "systemtags.h"
11 #define DEBUG 0
12 #include <aros/debug.h>
14 int main(void)
16 LONG result;
18 /* Execute and wait */
19 result = SystemTags("Echo Synchronous Test", NULL);
20 Printf("Execution results %ld == 0 ?\n", result);
22 /* Start asynchronous */
23 result = SystemTags("Echo Asynchronous Test",
24 SYS_Asynch, TRUE, SYS_Input, SYS_DupStream, SYS_Output, SYS_DupStream,
25 TAG_DONE
27 Printf("Execution results %ld == 0 ?\n", result);
29 /* Start non-existing command asynchronous */
30 result = SystemTags("DoesntExist",
31 SYS_Asynch, TRUE, SYS_Input, SYS_DupStream, SYS_Output, SYS_DupStream,
32 TAG_DONE
34 Printf("Execution results %ld == 0 ?\n", result);
36 /* Test with duplicated Input/Output stream */
37 result = SystemTags("systemtags_slave dont print",
38 SYS_Input, SYS_DupStream, SYS_Output, SYS_DupStream,
39 TAG_DONE
41 Printf("Execution results %ld == 0 ?\n", result);
43 /* Test passing of Input/Output streams */
44 struct STData data;
45 data.input = Input();
46 data.output = Output();
47 D(bug("[systemtags]Input: %p, Output: %p\n", data.input, data.output));
48 UBYTE buf[30];
49 __sprintf(buf, "systemtags_slave %p", &data);
50 result = SystemTags(buf, SYS_Input, BNULL, SYS_Output, BNULL,
51 TAG_DONE
53 Printf("Execution results %ld == 0 ?\n", result);
55 return 0;