Re-enabled use of AROS.Boot file due to lack of general enthusiasm for
[tangerine.git] / test / library / peropenertest.c
blob9a5deeee2d94edd6e3c5f19aba1b71f3c9095054
1 /*
2 Copyright © 2008-2009, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <proto/exec.h>
7 #include <proto/dos.h>
8 #include <proto/peropener.h>
9 #include <proto/perid.h>
11 int main (int argc, char ** argv)
13 struct Library *base1, *base2;
14 BPTR seglist;
16 FPuts(Output(), (STRPTR)"Testing peropener.library\n");
18 base1=OpenLibrary((STRPTR)"peropener.library",0);
19 base2=OpenLibrary((STRPTR)"peropener.library",0);
21 FPrintf(Output(), (STRPTR)"base1=%lx, base2=%lx\n", base1, base2);
23 if (base1 != NULL)
24 CloseLibrary(base1);
25 if (base2 != NULL)
26 CloseLibrary(base2);
28 FPuts(Output(), (STRPTR)"\nTesting perid.library\n");
30 base1=OpenLibrary((STRPTR)"perid.library",0);
31 base2=OpenLibrary((STRPTR)"perid.library",0);
33 FPrintf(Output(), (STRPTR)"base1=%lx, base2=%lx\n", base1, base2);
35 seglist = LoadSeg((CONST_STRPTR)"peropenertest_child");
36 if (seglist != (BPTR)NULL)
38 RunCommand(seglist, 10*1024, "\n", -1);
39 UnLoadSeg(seglist);
41 else
43 FPrintf(Output(), (STRPTR)"Failed to load peropenertest_child\n");
46 if (base1 != NULL)
47 CloseLibrary(base1);
48 if (base2 != NULL)
49 CloseLibrary(base2);
51 Flush (Output ());
53 return 0;