Ignore generated file.
[libguestfs.git] / test-command.c
1 /* libguestfs
2  * Copyright (C) 2009 Red Hat Inc.
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18
19 /* This program, which must be statically linked, is used to test the
20  * guestfs_command and guestfs_command_lines functions.
21  */
22
23 #include <stdio.h>
24 #include <stdlib.h>
25 #include <string.h>
26 #include <unistd.h>
27
28 int
29 main (int argc, char *argv[])
30 {
31   if (argc > 1) {
32     if (strcmp (argv[1], "1") == 0) {
33       printf ("Result1");
34     } else if (strcmp (argv[1], "2") == 0) {
35       printf ("Result2\n");
36     } else if (strcmp (argv[1], "3") == 0) {
37       printf ("\nResult3");
38     } else if (strcmp (argv[1], "4") == 0) {
39       printf ("\nResult4\n");
40     } else if (strcmp (argv[1], "5") == 0) {
41       printf ("\nResult5\n\n");
42     } else if (strcmp (argv[1], "6") == 0) {
43       printf ("\n\nResult6\n\n");
44     } else if (strcmp (argv[1], "7") == 0) {
45       /* nothing */
46     } else if (strcmp (argv[1], "8") == 0) {
47       printf ("\n");
48     } else if (strcmp (argv[1], "9") == 0) {
49       printf ("\n\n");
50     } else if (strcmp (argv[1], "10") == 0) {
51       printf ("Result10-1\nResult10-2\n");
52     } else if (strcmp (argv[1], "11") == 0) {
53       printf ("Result11-1\nResult11-2");
54     } else {
55       fprintf (stderr, "unknown parameter: %s\n", argv[1]);
56       exit (1);
57     }
58   } else {
59     fprintf (stderr, "missing parameter\n");
60     exit (1);
61   }
62
63   exit (0);
64 }