tests update
[mala.git] / tests / test-mala_expansions.c
blobce22d3ea2b6c6cd1ba5ac4a43ca42ab2b2f067f7
1 /*
2 test-mala_expansions.c - MaLa preprocessor test suite
4 Copyright (C) 2004, Christian Thaeter <chth@gmx.net>
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License version 2 as
8 published by the Free Software Foundation.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, contact me.
19 #include <assert.h>
20 #include <stdio.h>
21 #include <stdlib.h>
22 #include "mala.h"
23 #include "std.h"
25 int
26 main(int argc, char * argv[])
28 MalaEngine my_engine;
29 //MalaStringListNode pptr;
31 (void) argc;
32 (void) argv;
34 my_engine = mala_engine_new ();
36 //TODO mala_module_std_init (my_engine);
38 //TODO mala_engine_action_new_cstr (my_engine, "--PROGRAM-NAME", mala_substitute_parser, argv[0]);
41 //llist args;
42 //llist_init (&args);
44 //mala_stringlist_append_cstrs (&args, argc - 1, argv + 1, my_engine);
46 // run the preprocessor on the list
47 //mala_stringlist_head_new_cstr (list, "--PREPROCESS");
48 //mala_engine_run_list (my_engine, list);
50 // safe the list as --COMMANDLINE
51 //mala_engine_action_new_list (my_engine, "--COMMANDLINE", mala_expand_parser, list);
56 //mala_engine_ppexpand_define (my_engine, "--PROGRAM", argc - 1, argv + 1);
58 //mala_engine_step (my_engine);
59 //pptr = mala_stringlist_head ( mala_engine_getprogram (my_engine));
60 //mala_engine_arg_eval (my_engine, &pptr, 0, 1, NULL);
62 //mala_engine_dumpargs (my_engine, stdout, "arg: ", "\n");
63 //mala_engine_dumpprogram (my_engine, stdout, "prg: ", "\n");
65 // printf ("variable: %s\n", getenv ("variable"));
66 //printf ("negated: %d\n", mala_engine_negated (my_engine));
67 //printf ("state: %s\n", mala_engine_state_str (my_engine));
69 mala_engine_free (my_engine);
70 return 0;
76 // Local Variables:
77 // mode: C
78 // c-file-style: "gnu"
79 // End:
80 // arch-tag: 2ce6015a-6da8-4ad9-ab3c-602347445b93
81 // end_of_file